Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfixef doesn't handle integer variables on varying slopes #20
Comments
|
Et bonjour, Thanks for this very neat bug report! I've solved it in If you're OK, I'll close the issue when I manage to make a stable GH version. Merci et bonne journée à toi aussi ! |
|
The new version (0.5.0) should soon come to CRAN. The current GH version is stable. I didn't have the time to implement the varying slopes stuff (I had many other cats to whip [I don't know if this expression translates well in English]), it will be for the next release. But, for the record, estimations are now much much faster when factors (including varying slopes) are treated as regular variables (and not in the fixed-effects part). Thanks again for the report! |
Hi (bonjour),
fixef returns an error when the varying slope variable is an integer. See the code below :
##your example
base_vs = iris
names(base_vs) = c(paste0("x", 1:4), "species")
est_vs = feols(x1 ~ x2 | species[x3], base_vs)
fixef(est_vs)
##the example which leads to an error
base_vs$x4=as.integer(base_vs$x3)
est_vs = feols(x1 ~ x2 | species[x4], base_vs)
fixef(est_vs)
##one way to solve it
base_vs$x5=as.numeric(as.integer(base_vs$x3))
est_vs = feols(x1 ~ x2 | species[x5], base_vs)
fixef(est_vs)
Bonne journée,