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
Import excel table to stataHi every one, I have problem when import data from excel. My excel table has type of: year 1 ye…
Rename a function?How should I rename a function in Stata? I combine Stata and R, and to reduce confusion, I’d like t…
Is % bias is more important than t test results for PSM?My variable of interest is ethnicity. Ethnicity has two categories: natives or migrants. I want to s…
Order studies within group by time in meta-analysis forest plotHi everyone I am working on a forest plot. I want to order the studies within each group by publica…
To append or to mergeI would like to create a long panel from the 17 waves of panel data from the HILDA survey but am str…
Subscribe to:
Post Comments (Atom)
0 Response to Outreg2 to Excel R(198) error diagnosis
Post a Comment