Learn R Programming

mitools (version 2.4)

with.imputationList: Evaluate an expression in multiple imputed datasets

Description

Performs a computation of each of imputed datasets in data

Usage

# S3 method for imputationList
with(data, expr, fun, ...)

Arguments

data

An imputationList object

expr

An expression

fun

A function taking a data frame argument

...

Other arguments, passed to fun

Value

Either a list or an imputationResultList object

Details

If expr is supplied, evaluate it in each dataset in data; if fun is supplied, it is evaluated on each dataset. If all the results inherit from "imputationResult" the return value is an imputationResultList object, otherwise it is an ordinary list.

See Also

imputationList

Examples

Run this code
# NOT RUN {
data(smi)
models<-with(smi, glm(drinkreg~wave*sex,family=binomial()))
tables<-with(smi, table(drkfre,sex))
with(smi, fun=summary)
# }

Run the code above in your browser using DataLab