I am using the Bucky
package in R to generate robust standard errors for a multiply imputed dataset. I am wondering if there is some method to preform a likelihood ratio test or Wald test on my results (similar to the D1() function
in mice
). I need to compare two models (one with and one without an interaction term; the interaction term has multiple categories, and I need a global test for all of them).
I have tried converting my models to mira
objects, as follows, and I get the same error code each time. Is there any way around this? Thank you!
ad.model.dep <- bucky::mi.eval(
glm(
w7.dep.bin ~ w6.shootmean + w5.dep.cont + w5.gad.cont + w5.pd.cont +
sex + age + ethnic + lunch + w3.cyberbully + w5.connect + w5.db +
w5.adhd + w5.alc + w5.nicmjdrugs,
family = binomial(link = "logit"),
data = HH.imputed
),
cluster = HH.imputed$data$school
)
int.ethnic.model.dep <- bucky::mi.eval(
glm(
w7.dep.bin ~ w6.shootmean*ethnic + w5.dep.cont + w5.gad.cont + w5.pd.cont +
age + sex + lunch + w3.cyberbully + w5.connect + w5.db +
w5.adhd + w5.alc + w5.nicmjdrugs,
family = binomial(link = "logit"),
data = HH.imputed
),
cluster = HH.imputed$data$school
)
D1(as.mira(int.ethnic.model.dep), as.mira(ad.model.dep))
Error: No glance method for objects of class numeric
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…