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
Standardize interaction term where one term is dummyLet's start with the given that, in addition to presenting unstandardized coefficients, I am also pr…
Linear restrictions in coefficients after using xtmg panel data commadDear collegues, I have estimated a mean group (Pesaran and Smith 1995) panel data model with "xtmg"…
Does mediator make the relationship between the independent and dependent variables stronger?If we believe a variable is a mediator, does it make the relationship between the independent variab…
"substr" does not work for the string with "_"Hi, I am trying to generate two scalars to store numbers from the string "crmlaw_2014_2018" and "te…
LMDI error messageHas anyone used the LMDI code in STATA? I have been trying to use the LMDI syntax to decompose water…
Subscribe to:
Post Comments (Atom)
0 Response to Outreg2 to Excel R(198) error diagnosis
Post a Comment