Skip to content

Instantly share code, notes, and snippets.

@mattblackwell
Created November 21, 2013 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattblackwell/7587294 to your computer and use it in GitHub Desktop.
Save mattblackwell/7587294 to your computer and use it in GitHub Desktop.
Using the subset argument to overimpute() in Amelia
library(Amelia)
data(africa)
a.out <- amelia(africa, ts = "year", cs = "country")
overimpute(a.out, "gdp_pc")
overimpute(a.out, "gdp_pc", subset = country == "Burkina Faso")
overimpute(a.out, "gdp_pc", subset = gdp_pc >=500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment