with.amelia {Amelia}R Documentation

Execute commands within each imputed data set

Description

Evaluate an R expression in the environments constructed from the imputed data sets of a call to amelia function.

Usage

## S3 method for class 'amelia'
with(data, expr, ...)

Arguments

data

imputation output from the amelia funtion.

expr

expression to evaluate in each imputed data set in data.

...

arguments to be passed to (future) methods.

Value

a list the same length as data$imputations that contains the output of the expression as evaluated in each imputed data set of data.

Author(s)

Matt Blackwell

Examples

data(africa)
a.out <- amelia(x = africa, cs = "country", ts = "year", logs =
"gdp_pc")

imp.mods <- with(a.out, lm(gdp_pc ~ infl + trade))

mi.combine(imp.mods, conf.int = TRUE)


[Package Amelia version 1.8.2 Index]