Skip to content
StatsOtter A workspace for causal thinking
Method library WORKFLOW / 052
Research workflow/5 steps

Multiple imputation of missing data (Amelia)

01
The method workspace

Follow the analysis.

Select a node to explore the method

Method mapInput → 5 steps → output
START WITHInput data
ARRIVE ATResults
Read step 01
Inside the methodReasoning, equations & implementation
Step 1 of 5
01
Data prep

Load Amelia and the freetrade data

Data preparation — shapes the raw inputs into what the estimator expects.

What happens here

Load the package and the freetrade panel of trade policy in Asian countries, which has missing values in tariff and other columns.

Reads fromNot specified Feeds into#2
Key code
# Install:  install.packages("Amelia")
library(Amelia)
data(freetrade)
summary(freetrade)

Reference / docs ↗

Discussion on this step (0)
StatsOtterDiscussion starter · Editorial note

Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.

Questions to explore
  1. Which assumption matters most here, and what evidence could challenge it?
  2. What would you check before passing this output to the next step?

Peer discussion

  • Bring your experience, a question, or a different perspective.
02
Data contract

Inputs & data

A data frame with missing values (NA), optionally with declared time-series/cross-section ID variables.

Show data format & exampleHide example
year country gdp trade
1990 A 5.2 NA
1991 A NA 41.0
1990 B 3.1 28.4
1991 B 3.4 NA
03
Read the evidence

Results & interpretation

1 figure Workflow discussion 0
01FigureObserved vs imputed distribution of tariff across the five imputations.

Result figure rendered by StatsOtter from the package's documented example — unofficial community showcase; all credit to the original authors.

The estimate

\bar Q=\frac1m\sum_{k=1}^{m}\hat Q_k,\qquad T=\bar U+\Big(1+\tfrac1m\Big)B

Context & interpretation

⚠️ Unofficial community showcase of Amelia (docs). Not affiliated with the authors — all credit to Gary King & coauthors; this summarizes public documentation.

What it does: Amelia (Amelia II) performs multiple imputation of missing data for cross-sectional, time-series, and time-series-cross-section datasets, generating m complete datasets that reflect imputation uncertainty. How it works: It assumes the data are jointly multivariate normal and missing at random, then uses an EMB (Expectation-Maximization with Bootstrapping) algorithm—bootstrapping the data and running EM on each replicate—which is far faster and more stable than MCMC approaches while giving comparable answers. It supports priors, transformations for skewed/bounded variables, and time and cross-section structure via polynomials of time and lags/leads. Assumptions: Multivariate normality (after transformation) and missing-at-random (MAR). Analysts fit their model on each imputed dataset and combine results with Rubin's rules. Output: m completed datasets plus diagnostics (overimputation, density comparisons) to assess imputation quality.

What you get — m completed datasets (imputations) plus diagnostics; analyze each and pool with Rubin's rules.

Example output

Amelia output with 5 imputed datasets.
Return code:  1
Message:  Normal EM convergence.

Chain Lengths:
--------------
Imputation 1:  17
Imputation 2:  20
Imputation 3:  16
Imputation 4:  18
Imputation 5:  19

Rows after Listwise Deletion:  96
Rows after Imputation:  171
Patterns of missingness in the data:  8

Fraction Missing for original variables:
-----------------------------------------

           Fraction Missing
tariff            0.34502924
polity            0.01169591
intresmi          0.07602339
signed            0.01754386
fiveop            0.10526316

Links: package · paper

Peer notes

Discuss the workflow (0)

  • No comments yet — start the conversation.
IN THE MARGINS

Peer discussion