Hi Sara,
To give you a sense of how Amelia tries to determine which variables are perfectly
collinear, it runs a regression of a randomly generated variable on all of the variables
in the listwise deleted data and chooses the coefficients that are dropped due to perfect
or near-perfect collinearity. It is possible that there is a collinearity problem in the
data and that this approach is not providing the source of the problem. You might try to
play around with such a regression on your own to see where any perfectly collinear
variables are.
Hope that helps!
Cheers,
Matt
~~~~~~~~~~~
Matthew Blackwell
Assistant Professor of Government
Harvard University
url:
http://www.mattblackwell.org
On Mon, Dec 29, 2014 at 9:41 AM, Sara Anderson <saraliz.anderson(a)gmail.com>
wrote:
Hi all,
I'm running into a strange problem running Amelia. I receive the following
error when I try to run Amelia with about 60 variable (N = 2500):
Error in amcheck(x = x, m = m, idvars = numopts$idvars, priors = priors, :
It then lists about half of my variables as being "perfectly collinear".
This is improbable at best. Besides trimming my dataset starting with all
problematic variables, then slowly adding them back in, are there any other
potential solutions?
Thanks!
Sara Anderson
Original code:
amelia(x = getAmelia("amelia.data"), m = 5, idvars = c("studentid",
"bg_id"), ts = NULL, cs = NULL, priors = NULL, lags = NULL, empri = 0,
intercs = FALSE, leads = NULL, splinetime = NULL, logs = NULL,
sqrts = NULL, lgstc = NULL, ords = NULL, noms = c("gifted_14",
"ell_14", "sped_14", "mom_conf",
"peer_1d", "peer_2d", "grade_14",
"district", "female", "ps", "lastyrpk",
"lastyrhs", "lwfather",
"internet", "race2", "tpslunch0607",
"daycare_oh3", "preschool3",
"headstart3", "centerbased3", "foreignborn",
"english", "momeduc",
"sus_13d", "marital_r"), bounds = c(1, 2, 3, 6, 7, 11, 14,
42, 43, 0, 0, 0, 0, 0, 0, 0, 400, 400, 4, 4, 4, 990, 990,
4, 2, 990, 990), max.resample = 1000, tolerance = 1e-04)