sergiocorreia / reghdfe

Linear, IV and GMM Regressions With Any Number of Fixed Effects
http://scorreia.com/software/reghdfe/
MIT License
214 stars 56 forks source link

[BUG] file not found: ftools,.ado #254

Closed chengjun closed 2 years ago

chengjun commented 2 years ago

Before submitting the bug report

. which ftools /Applications/Stata/ado/base/f/ftools.ado *! version 2.48.0 29mar2021

. which reghdfe /Applications/Stata/ado/base/r/reghdfe.ado *! version 6.12.2 02Nov2021

Bug report

Please complete the following information:

Behavior

cap ado uninstall ftools
cap ado uninstall reghdfe
*** I mannualy download ftools and reghdfe github repos, rename them, and then use net install
net install ftools, from("/Users/chengjun/Downloads/ftools/src") 
net install reghdfe, from("/Users/chengjun/Downloads/reghdfe/src") 

ftools, compile
which ftools
which reghdfe

/Users/chengjun/Library/Application Support/Stata/ado/plus/f/ftools.ado *! version 2.48.0 29mar2021

/Users/chengjun/Library/Application Support/Stata/ado/plus/r/reghdfe.ado *! version 6.12.2 02Nov2021

. sysuse auto, clear
(1978 automobile data)

. reghdfe price weight length, absorb(rep78)
file not found: ftools,.ado
r(123);

I find that I have to firstly add the directory to the beginning of the ado-path.

Once I restart STATA, I have to firstly specify the ado-path as following:

adopath ++ "/Users/chengjun/Library/Application Support/Stata/ado/plus/"

image

If I restart STATA without firstly specifying the ado-path, the error "file not found: ftools,.ado" will occur.

image

chengjun commented 2 years ago

According to this stackoverflow post, I found a solution: adding adopath ++ "/Users/chengjun/Library/Application Support/Stata/ado/plus/" into the profile.do file which is automatically running when STATA restarts.