sergiocorreia / ppmlhdfe

Poisson pseudo-likelihood regression with multiple levels of fixed effects
http://scorreia.com/software/ppmlhdfe/
MIT License
63 stars 13 forks source link

Failure to detect reghdfe, which has already been installed (Stata 17) #20

Closed garethcao closed 1 year ago

garethcao commented 1 year ago

In Stata 17, I have installed ftools, reghdfe, and ppmlhdfe. I use "which + command" to check their versions as follows:

. which ftools
*! version 2.49.1 08aug2023

. which reghdfe
*! version 6.12.3 08aug2023

. which ppmlhdfe
*! version 2.3.0 25feb2021
*! Authors: Sergio Correia, Paulo Guimarães, Thomas Zylkin
*! URL: https://github.com/sergiocorreia/ppmlhdfe

However, when I run regression using ppmlhdfe, I got the following message:

ppmlhdfe requires the reghdfe package (version 6 or newer), which is not installed
    - install from SSC
    - install from Github
(error occurred while loading ppmlhdfe.ado)
r(9);

What should I do to solve this problem? Thanks!

sergiocorreia commented 1 year ago

Can you try uninstalling and then reinstalling reghdfe? It feels that the same solved problem listed here:

https://github.com/sergiocorreia/reghdfe/issues/273

garethcao commented 1 year ago

Thanks. I have tried it while the following message was displayed:

host not found
https://raw.githubusercontent.com/sergiocorreia/reghdfe/master/src/ either
  1)  is not a valid URL, or
  2)  could not be contacted, or
  3)  is not a Stata download site (has no stata.toc file).

current site is still http://fmwww.bc.edu/repec/bocode/p/

I am afraid that it may result from the fact that I am currently located in Asia and there is sth wrong with my network. Could I fix this problem manually?

sergiocorreia commented 1 year ago

I am afraid that it may result from the fact that I am currently located in Asia and there is sth wrong with my network. Could I fix this problem manually?

Installing from Github requires HTTPS, which is blocked by some internal firewalls as well as some countries (China etc). There are two solutions:

1) The simplest is to uninstall SSC, and then reinstall from SSC as well, because the problem should be already fixed in SSC so it should work. 2) Else, you can download the zipfile for the reghdfe repo (top-right corner, find a green download button), extract that to your computer, and install from there.

garethcao commented 1 year ago

I am afraid that it may result from the fact that I am currently located in Asia and there is sth wrong with my network. Could I fix this problem manually?

Installing from Github requires HTTPS, which is blocked by some internal firewalls as well as some countries (China etc). There are two solutions:

  1. The simplest is to uninstall SSC, and then reinstall from SSC as well, because the problem should be already fixed in SSC so it should work.
  2. Else, you can download the zipfile for the reghdfe repo (top-right corner, find a green download button), extract that to your computer, and install from there.

It seems that uninstall/re-install through SSC does not solve the problem. However, downloading the zip file & installing from it do work! Now the ppmlhdfe command could work well. Thanks so much!