Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
303 views
in Technique[技术] by (71.8m points)

robust - Bucky package in R - global test for multiple covariates?

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...