You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like getfe chooses the reference level for the fixed effects based on the pattern of unbalancedness if there is more than one fixed effect. This feels somewhat random to the end-user (seems like it is the first level with max observations).
A second thing I noticed about getfe is that the reference argument does not seems to be respected (if method != "kaczmarz").
See the examples below with comments (they are for IV models, but same applied to ordinary regression models).
data("Crime", package = "plm")
delrows.a <- -c(1,2,10,12)
delrows.b <- -c(9)
crime_formula_2SLS_tw <- lcrmrte ~ lprbconv + lprbpris + lavgsen +
ldensity + lwcon + lwtuc + lwtrd + lwfir +
lwser + lwmfg + lwfed + lwsta + lwloc + lpctymle |
county + year |
(lprbarr|lpolpc ~ ltaxpc + lmix)
FE2SLS_tw_unbal.felm.a <- lfe::felm(crime_formula_2SLS_tw, data = Crime[delrows.a, ])
FE2SLS_tw_unbal.felm.b <- lfe::felm(crime_formula_2SLS_tw, data = Crime[delrows.b, ])
getfe(FE2SLS_tw_unbal.felm.a) # year.84 is set to zero
getfe(FE2SLS_tw_unbal.felm.b) # year.81 is set to zero
# same for ef = "zm"
getfe(FE2SLS_tw_unbal.felm.a, ef = "zm") # year.84 is set to zero
getfe(FE2SLS_tw_unbal.felm.b, ef = "zm") # year.81 is set to zero
# arg references does not work with method != "kaczmarz"
getfe(FE2SLS_tw_unbal.felm.a, references = "year.81", method = "cg")
getfe(FE2SLS_tw_unbal.felm.a, references = "year.81", method = "cholesky")
The text was updated successfully, but these errors were encountered:
It seems like
getfe
chooses the reference level for the fixed effects based on the pattern of unbalancedness if there is more than one fixed effect. This feels somewhat random to the end-user (seems like it is the first level with max observations).A second thing I noticed about
getfe
is that thereference
argument does not seems to be respected (ifmethod != "kaczmarz"
).See the examples below with comments (they are for IV models, but same applied to ordinary regression models).
The text was updated successfully, but these errors were encountered: