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)