Dear all,
when running the command estfe (belongs to reghdfe), Stata sometimes gives me the error message "invalid syntax". I use Stata 17.0.
I run a fixed effects model using the reghdfe command by Sergio Correia (amazing command):
To indicate the FE in my model, I use the estfe command:
Then, I export the obtained regression output using esttab:
Usually, the command runs without any error message and gives me the desired result.
Sometimes, and only sometimes however, I get the error message "invalid syntax". I tried uninstalling and installing again the reghdfe, the estout and the erepost (necessary for estfe) packages, closening and opening Stata and restarting my laptop to solve the error. This works sometimes, however I cannot narrow down what exact measure fixes the issue.
Does anybody know what is the cause for this error message? Do you also know how to fix this issue?
Thanks in advance!
when running the command estfe (belongs to reghdfe), Stata sometimes gives me the error message "invalid syntax". I use Stata 17.0.
I run a fixed effects model using the reghdfe command by Sergio Correia (amazing command):
Code:
eststo column1: reghdfe stock_weight i.cat_distance##i.cat_disaster, absorb(year disaster_quarter num_county) vce(cluster county) eststo column2: reghdfe stock_weight i.cat_distance##i.cat_disaster `firmcontrols', absorb(year disaster_quarter num_county) vce(cluster county)
Code:
estfe column*, labels(year "Year FE" disaster_quarter "Disaster quarter FE" num_county "County FE") return list
Code:
esttab column1 column2 using "05_tables\table 11.rtf", nobaselevels interaction(" x ") indicate("Year FE=0.year" "Disaster quarter FE=0.disaster_quarter" "County FE=0.num_county") drop("0._cons") label replace
Sometimes, and only sometimes however, I get the error message "invalid syntax". I tried uninstalling and installing again the reghdfe, the estout and the erepost (necessary for estfe) packages, closening and opening Stata and restarting my laptop to solve the error. This works sometimes, however I cannot narrow down what exact measure fixes the issue.
Does anybody know what is the cause for this error message? Do you also know how to fix this issue?
Thanks in advance!
Comment