mice (version 3.9.0)

D1: Compare two nested models using D1-statistic

Description

The D1-statistics is the multivariate Wald test.

Usage

D1(fit1, fit0 = NULL, df.com = NULL, ...)

Arguments

fit1

An object of class mira, produced by with().

fit0

An object of class mira, produced by with(). The model in fit0 is a nested within fit1. The default null model fit0 = NULL compares fit1 to the intercept-only model.

df.com

A single number or a numeric vector denoting the complete-data degrees of freedom for the hypothesis test. If not specified, it is set equal to df.residual of model fit1.

Not used.

References

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<U+2013>73.

https://stefvanbuuren.name/fimd/sec-multiparameter.html#sec:wald

See Also

testModels

Examples

Run this code
# NOT RUN {
# 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)

# 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)
# }

Run the code above in your browser using DataLab