pool.compare {mice}R Documentation

Compare two nested models fitted to imputed data

Description

Compares two nested models after m repeated complete data analysis

Usage

  pool.compare(fit1, fit0, data=NULL, method="Wald")

Arguments

fit1

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

fit0

An object of class 'mira', produced by with.mids(). The model in fit0 should be a submodel of fit1. Moreover, the variables of the submodel should be the first variables of the larger model and in the same order as in the submodel.

data

In case of method "likelihood" it is necessary to pass also the original mids object to the data argument. Default value is NULL, in case of method="Wald".

method

A string describing the method to compare the two models. Two kind of comparisons are included so far: "Wald" and "likelihood".

Details

The function is based on the article of Meng and Rubin (1992). The Wald-method can be found in paragraph 2.2 and the likelihoodmethod can be found in paragraph 3. One could use the Wald method for comparison of linear models obtained with e.g. lm (in with.mids()). The likelihood method should be used in case of logistic regression models obtaind with glm() in with.mids(). It is assumed that fit1 contains the larger model and the model in fit0 is fully contained in fit1. In case of method="Wald", the null hypothesis is tested that the extra parameters are all zero.

Value

A list containing the elements:

call

The call to the pool.compare function

call11

The call that created fit1

call12

The call that created the imputations.

call01

The call that created fit0

call02

The call that created the imputations.

method

The method used to compare two models: "Wald" or "likelihood"

nmis

The number of missing entries for each variable.

m

The number of imputations

qhat1

A matrix, containing the estimated coeffients of the m repeated complete data analyses from fit1

qhat0

A matrix, containing the estimated coeffients of the m repeated complete data analyses from fit0

ubar1

The mean of the variances of object1, formula (3.1.3), Rubin (1987).

ubar0

The mean of the variances of object0, formula (3.1.3), Rubin (1987).

qbar1

The pooled estimate of object1, formula (3.1.2) Rubin (1987).

qbar0

The pooled estimate of object0, formula (3.1.2) Rubin (1987).

Dm

The test statistic

rm

Relative increase in variance due to nonresponse, formula (3.1.7), Rubin (1987).

df1

df1; Under the null hypothesis it is assumed that Dm has an F distribution with (df1,df2) degrees of freedom.

df2

df2

pvalue

P-value of testing whether the larger model is statistically different from the smaller submodel.

Author(s)

Karin Groothuis-Oudshoorn and Stef van Buuren, 2009

References

Li, K.H., Meng, X.L., Raghunathan, T.E. and Rubin, D. B. (1991). Significance levels from repeated p-values with multiply-imputed data. Statistica Sinica, 1, 65-92.

Meng, X.L. and Rubin, D.B. (1992). Performing likelihood ratio tests with multiple-imputed data sets. Biometrika, 79, 103-111.

van Buuren S and Groothuis-Oudshoorn K (2011). mice: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software, 45(3), 1-67. http://www.jstatsoft.org/v45/i03/

See Also

lm.mids, glm.mids, vcov,

Examples

### To compare two linear models:
imp <- mice(nhanes2)
mi1 <- with(data=imp, expr=lm(bmi~age+hyp+chl))
mi0 <- with(data=imp, expr=lm(bmi~age+hyp))
pc  <- pool.compare(mi1, mi0, method="Wald")
pc$spvalue
#            [,1]
#[1,] 0.000293631
# 

### Comparison of two general linear models (logistic regression).
imp  <- mice(boys, maxit=2)

fit0 <- with(imp, glm(gen>levels(gen)[1] ~ hgt+hc,family=binomial))
fit1 <- with(imp, glm(gen>levels(gen)[1] ~ hgt+hc+reg,family=binomial))
pool.compare(fit1, fit0, method="likelihood", data=imp)

[Package mice version 2.11 Index]