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
Warning message:
Unable to extract a variance-covariance matrix using this vcov argument. Standard errors are computed using the default variance
instead. Perhaps the model or argument is not supported by the sandwich or clubSandwich packages. If you believe that the
model is supported by one of these two packages, you can open a feature request on Github.
Hi. It seems that the problem you encountered was with marginaleffects::avg_predictions(). Therefore, you should post your issue on the marginaleffects repository: https://github.com/vincentarelbundock/marginaleffects
Dear Team,
I'm estimated a mixed-effects model with nlme::lme() and want to use marginaleffects::avg_predictions() on the lme object.
After running the code:
ModelWeek1 <- nlme::lme(IAT_Score ~ BeginProtests_f + age_centred + genderIdentity_f,
random = (~ 1 | STATE),
data = df_propensity_wts,
na.action = "na.omit",
control = lmerControl(optimizer = "bobyqa", calc.derivs = FALSE),
weights = ~1/wts)
avg_predictions(ModelWeek1,
variables = "BeginProtests_f",
wts = "wts",
vcov = "HC3")
I get the following warning message:
Warning message:
Unable to extract a variance-covariance matrix using this
vcov
argument. Standard errors are computed using the default varianceinstead. Perhaps the model or argument is not supported by the
sandwich
orclubSandwich
packages. If you believe that themodel is supported by one of these two packages, you can open a feature request on Github.
I looked at the sandwich help pages and it seems that lme objects are supported (https://rdrr.io/cran/clubSandwich/man/vcovCR.lme.html).
Hence, I`m contacting you here to see whether I'm doing something wrong and/or how to use avg_predictions() successfully with robust standard errors.
Best Regards,
Max
The text was updated successfully, but these errors were encountered: