Used to extract parameter estimates and standard errors from lists produced by with.imputationList.

MIextract(results, expr, fun)

Arguments

results

A list of objects

expr

an expression

fun

a function of one argument

Value

A list

Details

If expr is supplied, it is evaluated in each element of results. Otherwise each element of results is passed as an argument to fun.

Examples

data(smi)
models<-with(smi, glm(drinkreg~wave*sex,family=binomial()))

betas<-MIextract(models,fun=coef)
vars<-MIextract(models, fun=vcov)
summary(MIcombine(betas,vars))
#> Multiple imputation results:
#>       MIcombine.default(betas, vars)
#>                 results         se      (lower     upper) missInfo
#> (Intercept) -2.25974358 0.26830731 -2.78584855 -1.7336386      4 %
#> wave         0.24055250 0.06587423  0.11092461  0.3701804     12 %
#> sex          0.64905222 0.34919264 -0.03537187  1.3334763      1 %
#> wave:sex    -0.03725422 0.08609199 -0.20623121  0.1317228      7 %