JanDitzen / nwxtregress

Network Regressions in Stata
https://janditzen.github.io/nwxtregress/
19 stars 8 forks source link

r(199); reghdfe Mata library not found or error in reghdfe. #18

Closed AaronPengDing closed 1 year ago

AaronPengDing commented 1 year ago

Dear Jan, I run the demo code in your GitHub:

Partial out firm and year fixed effects (requires reghdfe): nwxtregress cap_cons compensation net_surplus , dvarlag(Wt,mata timesparse) ivarlag(Wt: compensation,mata timesparse ) seed(1234) absorb(ID Year)

I encounter the following error message: reghdfe Mata library not found or error in reghdfe. r(199);

I use stata 17MP and update the reghdfe. Thank you! Peng

JanDitzen commented 1 year ago

Hi Peng, thank you very much for your question. This seems to be an error with reghdfe. What happens if you type: reghdfe, version respectively nwxtregress cap_cons compensation net_surplus , dvarlag(Wt,mata timesparse) ivarlag(Wt: compensation,mata timesparse ) seed(1234) absorb(ID Year, trace)

AaronPengDing commented 1 year ago

Thank you, Jan. When I type: . reghdfe, version last estimates not found r(301);

. nwxtregress cap_cons compensation net_surplus , dvarlag(Wt,mata timesparse) ivarlag(Wt: compensation,mata timesparse ) seed(1234) absorb(ID Year, trace)

command reghdfe_parse is unrecognized stata(): 3598 Stata returned error fixed_effects(): - function returned error

: - function returned error reghdfe Mata library not found or error in reghdfe. r(199); and this is the version of reghdfe . which reghdfe C:\Stata17\ado\plus\r\reghdfe.ado *! version 6.12.2 02Nov2021
JanDitzen commented 1 year ago

Thanks. I think there is a bug in reghdfe in the latest version from GitHub. Can you please try the version from SSC?

AaronPengDing commented 1 year ago

I install the stable version of reghdfe from SSC, and now it works. Thank you!

JanDitzen commented 1 year ago

Thanks for letting me know. I will add a note for future versions. Cheers