D1 | R Documentation |
The D1-statistics is the multivariate Wald test.
D1(fit1, fit0 = NULL, dfcom = NULL, df.com = NULL)
fit1 |
An object of class |
fit0 |
An object of class |
dfcom |
A single number denoting the
complete-data degrees of freedom of model |
df.com |
Deprecated |
Warning: 'D1()' assumes that the order of the variables is the same in different models. See https://github.com/amices/mice/issues/420 for details.
Li, K. H., T. E. Raghunathan, and D. B. Rubin. 1991. Large-Sample Significance Levels from Multiply Imputed Data Using Moment-Based Statistics and an F Reference Distribution. Journal of the American Statistical Association, 86(416): 1065–73.
https://stefvanbuuren.name/fimd/sec-multiparameter.html#sec:wald
testModels
# Compare two linear models:
imp <- mice(nhanes2, seed = 51009, print = FALSE)
mi1 <- with(data = imp, expr = lm(bmi ~ age + hyp + chl))
mi0 <- with(data = imp, expr = lm(bmi ~ age + hyp))
D1(mi1, mi0)
## Not run:
# Compare two logistic regression models
imp <- mice(boys, maxit = 2, print = FALSE)
fit1 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc + reg, family = binomial))
fit0 <- with(imp, glm(gen > levels(gen)[1] ~ hgt + hc, family = binomial))
D1(fit1, fit0)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.