glm.mids {mice}R Documentation

Generalized Linear Model for Multiply Imputed Data

Description

Applies glm() to a multiply imputed data set

Usage

## S3 method for class 'mids'
glm(formula, family = gaussian, data, ...)

Arguments

formula

a formula expression as for other regression models, of the form response ~ predictors. See the documentation of lm and formula for details.

family

The family of the glm model

data

An object of type mids, which stands for 'multiply imputed data set', typically created by function mice().

...

Additional parameters passed to glm.

Details

This function is included for backward compatibility with V1.0. The function is superseeded by with.mids.

Value

An objects of class mira, which stands for 'multiply imputed repeated analysis'. This object contains data$m distinct glm.objects, plus some descriptive information.

Author(s)

Stef van Buuren, Karin Groothuis-Oudshoorn, 2000

References

Van Buuren, S., Groothuis-Oudshoorn, C.G.M. (2000) Multivariate Imputation by Chained Equations: MICE V1.0 User's manual. Leiden: TNO Quality of Life. http://www.stefvanbuuren.nl/publications/MICE V1.0 Manual TNO00038 2000.pdf

See Also

with.mids, glm, mids, mira

Examples


imp <- mice(nhanes)
glm.mids((hyp==2)~bmi+chl, data=imp)
    # fit
    # $call:
    # glm.mids(formula = (hyp == 2) ~ bmi + chl, data = imp)
    # 
    # $call1:
    # mice(data = nhanes)
    # 
    # $nmis:
    #  age bmi hyp chl 
    #    0   9   8  10
    # 
    # $analyses:
    # $analyses[[1]]:
    # Call:
    # glm(formula = formula, data = data.i)
    # 
    # Coefficients:
    #  (Intercept)         bmi         chl 
    #   -0.4746337 -0.01565534 0.005417846
    # 
    # Degrees of Freedom: 25 Total; 22 Residual
    # Residual Deviance: 2.323886 
    # 
    # $analyses[[2]]:
    # Call:
    # glm(formula = formula, data = data.i)
    # 
    # Coefficients:
    #  (Intercept)         bmi         chl 
    #   -0.1184695 -0.02885779 0.006090282
    # 
    # Degrees of Freedom: 25 Total; 22 Residual
    # Residual Deviance: 3.647927 
    # 

[Package mice version 2.11 Index]