1
$\begingroup$

I'm looking to regress a fixed-effects model on count data. My initial approach was to take the log of regressor on R's plm package. Then I found out about the pglm package, which enables general distributions (such as Poisson). While the two models give consistent results for time-varying variables, they provide contradictory results (i.e. significant opposite signs) when time-invariant variables are introduced. According to Haussman et al. 1984, Woolridge 2002 and Alison 2009, results of these two models should be more or less similar. So what's going on?

library(plm, pglm)

data("PatentsRDUS", package="pglm”)

Poisson <- pglm(patents ~   log(rd)  + as.numeric(year)+ log(capital72)*center(as.numeric(year)) , PatentsRDUS,
           family = poisson(link=log), model = "within", index = c("cusip", "year"))

LogLin <- plm( log(patents+ 0.001) ~   log(rd)+ as.numeric(year)+center(log(capital72)*as.numeric(year)) , PatentsRDUS,
                model = "within", index = c("cusip", "year"))

summary(Poisson)

summary(LogLin)
$\endgroup$
  • $\begingroup$ does your patents variable have lots of values of 0,1,2? that's my first guess $\endgroup$ – probabilityislogic Mar 21 '19 at 2:12
  • $\begingroup$ @probabilityislogic Yes it does in this minimum example. However, the same thing happens in my initial problem where the response variable is averaged counts over 100 trials - i.e. very few 0, etc. Could there just be a bug in pglm? $\endgroup$ – Simon Berrebi Mar 22 '19 at 0:24
  • $\begingroup$ @mpiktas Amicrazy or the pglm package could have a bug? $\endgroup$ – Simon Berrebi Mar 22 '19 at 5:28
  • $\begingroup$ @SimonBerrebi I would try simulating from a synthetic data set generated by a process chosen by you and see if you can recover the ground truth. Then you'll know if it's a bug or not. $\endgroup$ – wolfsatthedoor Aug 14 '19 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.