Description Usage Arguments Value Note Author(s) Examples
This object prepares multiply imputed data sets so they can be used by
zelig
.
1 |
... |
a set of |
an mi
object composed of a list of data frames.
This function creates a list of data.frame
objects, which
resembles the storage of imputed data sets in the amelia
object.
Matt Owen, James Honaker, and Christopher Gandrud
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.