grantmcdermott / etwfe

Extended two-way fixed effects
https://grantmcdermott.com/etwfe/
Other
51 stars 11 forks source link

Error when trying to use emfx function. "Models of class "etwfe" are not supported." #45

Closed pgesteirads closed 9 months ago

pgesteirads commented 10 months ago

Hi Grant, thanks a lot for the package!

I succesfully run my model with etwfe(), but when i try to aggregate it by the emfxcommand, i get the following error:

> emfx(teste, type = "calendar")
Error: Models of class "etwfe" are not supported. Supported model classes include:

  afex_aov, amest, betareg, bglmerMod, bigglm, biglm, blmerMod, bracl, brglmFit, brmsfit, brnb, clm, clogit, coxph, crch,
  fixest, flac, flic, gam, Gam, gamlss, geeglm, glimML, glm, glmerMod, glmmPQL, glmmTMB, glmrob, glmx, gls, hetprob, hurdle,
  hxlr, iv_robust, ivpml, ivreg, lm, lm_robust, lme, lmerMod, lmerModLmerTest, lmrob, lmRob, loess, logistf, lrm, mblogit,
  mclogit, MCMCglmm, mhurdle, mira, mlogit, multinom, negbin, nls, ols, oohbchoice, orm, phyloglm, phylolm, plm, polr,
  Rchoice, rlmerMod, rq, scam, selection, speedglm, speedlm, stanreg, svyolr, tobit, tobit1, truncreg, zeroinfl

  New modeling packages can usually be supported by `marginaleffects` if they include a working `predict()` method. If you
  believe that this is the case, please file a feature request on Github:
  https://github.com/vincentarelbundock/marginaleffects/issues
grantmcdermott commented 10 months ago

Hmmm. What version of etwfe are you using?

Can you try installing the latest stable versions of etwfe, marginaleffects, and insight and trying again?

install.packages(c("etwfe", "marginaleffects", "insight"))

(Make sure to restart R completely after the above command.)

grantmcdermott commented 9 months ago

Closing in the absence of further updates. Feel free to reopen if you have installed the latest versions as per the above and it's still not working.