I am trying to run the below code in STATA 16.1. STATA is fully updated, and I've uninstalled and re-installed the outreg2 command, re-started STATA, and restarted my laptop to no avail.
I was previously able to successfully run this code on the same laptop a few days ago. I've made no change to the below code, or the earlier part of the do-file that tells STATA where to save outputs. Note there are "" around the output file path and the file name in the problem code, which is because my output file path as a space that I cannot remove (Emily XPS13).
Output file path: global outputs "C:\Users\Emily XPS13\Desktop\HESAanalysis\AlmudenaHESAOutputs"
Problem code: reg lsalary16 BLACKFEMALE BLACKMALE ASIANFEMALE ASIANMALE OTHERFEMALE OTHERMALE WHITEFEMALE, robust
outreg2 using "$outputs/TableEthnicGender.xls", replace dec(3) keep(BLACKFEMALE BLACKMALE ASIANFEMALE ASIANMALE OTHERFEMALE OTHERMALE WHITEFEMALE) label addtext(Controls, NO, University Dummies, NO, Year Dummies, NO)
When I try to run the below problem code today, every time I'm getting an error reading:
invalid 'XPS13'
r(198);
The regression itself will run fine in STATA if I just ru the reg line of code. If I run the whole thing, I get the above error. However, I can see by looking at the file where my outputs should go, that STATA is generating a txt file there with the results information, but it is failing to translate that into an Excel file to complete the action; giving me the r(198) error instead.
I also tried to make the file a .xslx file instead just in case, but same error problem. Any further trouble shooting suggestions? Feel a bit crazy since this worked a few days ago!
Related Posts with Outreg2 to Excel R(198) error diagnosis
Help needed to create a (potentially simple) variableHi, I need to create a variable that essentially sums the number of 1s each participant has accumul…
Create a dummy with 2 conditionHi everyone, I am a university student, so I am a beginner with STATA. My question is simple: I have…
Esttab produces wrong resultsHello, I conducted logit regressions using eststo for three different countries and then put the re…
Quantile regressionHello, I'm doing a thesis on the basis of RAND HIE data. I would like to run a quantile regression w…
PVAR problems: how to run pvarsoc commandHello everyone, I am new to the PVAR methods and I am having issues trying to run the pvarsoc comman…
Subscribe to:
Post Comments (Atom)
0 Response to Outreg2 to Excel R(198) error diagnosis
Post a Comment