Learn R Programming

Amelia (version 1.7.5)

mi.meld: Combine Multiple Results From Multiply Imputed Datasets

Description

Combine sets of estimates (and their standard errors) generated from different multiply imputed datasets into one set of results.

Usage

mi.meld(q, se, byrow = TRUE)

Arguments

q

A matrix or data frame of (k) quantities of interest (eg. coefficients, parameters, means) from (m) multiply imputed datasets. Default is to assume the matrix is m-by-k (see byrow), thus each row represents a set of results from one dataset, and each column represents the different values of a particular quantity of interest across the imputed datasets.

se

A matrix or data frame of standard errors that correspond to each of the elements of the quantities of interest in q. Should be the same dimensions as q.

byrow

logical. If TRUE, q and se are treated as though each row represents the set of results from one dataset (thus m-by-k). If FALSE, each column represents results from one dataset (thus k-by-m).

Value

q.mi

Average value of each quantity of interest across the m models

se.mi

Standard errors of each quantity of interest

Details

Uses Rubin's rules for combining a set of results from multiply imputed datasets to reflect the average result, with standard errors that both average uncertainty across models and account for disagreement in the estimated values across the models.

References

Rubin, D. (1987). Multiple Imputation for Nonresponse in Surveys. New York: Wiley.

Honaker, J., King, G., Honaker, J. Joseph, A. Scheve K. (2001). Analyzing Incomplete Political Science Data: An Alternative Algorithm for Multiple Imputation American Political Science Review, 95(1), 49--69. (p53)

Examples

Run this code
# NOT RUN {
data(africa)
m <- 5
a.out <- amelia(x = africa, m=m, cs = "country", ts = "year", logs = "gdp_pc")

b.out<-NULL
se.out<-NULL
for(i in 1:m) {
  ols.out <- lm(civlib ~ trade ,data = a.out$imputations[[i]])
  b.out <- rbind(b.out, ols.out$coef)
  se.out <- rbind(se.out, coef(summary(ols.out))[,2])
}

combined.results <- mi.meld(q = b.out, se = se.out)
# }

Run the code above in your browser using DataLab