Sto cercando di utilizzare il pacchetto stargazer
dopo aver stimato il modello con felm
(dal pacchetto lfe
) e ottenere l'errore, forse qualcuno potrebbe fornire assistenza su questo. Di seguito fornisco un semplice esempio.Utilizzo di stargazer per lfe e ricezione dell'errore
library(lfe)
library(stargazer)
oldopts <- options(lfe.threads=1)
x <- rnorm(1000)
x2 <- rnorm(length(x))
id <- factor(sample(10,length(x),replace=TRUE))
firm <- factor(sample(3,length(x),replace=TRUE,prob=c(2,1.5,1)))
year <- factor(sample(10,length(x),replace=TRUE,prob=c(2,1.5,rep(1,8))))
id.eff <- rnorm(nlevels(id))
firm.eff <- rnorm(nlevels(firm))
year.eff <- rnorm(nlevels(year))
y <- x + 0.25*x2 + id.eff[id] + firm.eff[firm] +year.eff[year] + rnorm(length(x))
est <- felm(y ~ x+x2 | id + firm + year)
stargazer(est)
ottengo il seguente errore:
Error in if (.global.coefficient.variables[i] %in% .global.intercept.strings) { : argument is of length zero
Questo potrebbe essere un bug, poiché il modello 'felm' è nella lista degli oggetti supportati (http://cran.r-project.org/web/packages/stargazer/stargazer.pdf). Probabilmente dovresti contattare il manutentore: 'maintainer (" stargazer ")'. –