Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

to_zelig_mi

Bundle Multiply Imputed Data Sets into an Object for Zelig


Description

This object prepares multiply imputed data sets so they can be used by zelig.

Usage

to_zelig_mi(...)

Arguments

...

a set of data.frame's or a single list of data.frame's

Value

an mi object composed of a list of data frames.

Note

This function creates a list of data.frame objects, which resembles the storage of imputed data sets in the amelia object.

Author(s)

Matt Owen, James Honaker, and Christopher Gandrud

Examples

# create datasets
n <- 100
x1 <- runif(n)
x2 <- runif(n)
y <- rnorm(n)
data.1 <- data.frame(y = y, x = x1)
data.2 <- data.frame(y = y, x = x2)

# merge datasets into one object as if imputed datasets

mi.out <- to_zelig_mi(data.1, data.2)

# pass object in place of data argument
z.out <- zelig(y ~ x, model = "ls", data = mi.out)

Zelig

Everyone's Statistical Software

v5.1.7
GPL (>= 3)
Authors
Christine Choirat [aut], Christopher Gandrud [aut], James Honaker [aut], Kosuke Imai [aut], Gary King [aut], Olivia Lau [aut], Robert Treacy [aut, cre], IQSS Harvard University [cph]
Initial release
2020-12-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.