Hi Nicole,
The singularity issue is often a result of linear combinations of
variables, like a linear scaling of three variables. These are hard to
detect with correlations. A better approach might be to add the variables
in one at a time to see which one is the offender. One hack that might work
is to run a regression of the first variable to be imputed on all of the
other variables in the imputation model, then check to see if R drops any
of the variables from the regression. That dropped variable is likely to be
the culprit.
Hope that helps!
Cheers,
matt.
~~~~~~~~~~~
Matthew Blackwell
Assistant Professor of Political Science
University of Rochester
url:
http://www.mattblackwell.org
On Fri, Jul 5, 2013 at 3:50 PM, Nicole Janz <nicolejanz(a)gmail.com> wrote:
Dear all,
I am rerunning an imputation from a while ago (Amelia version 1.6.3.), and
the only change is that I'm using a one year lag on all independent
variables instead of the 'original' variables. Otherwise the code + data is
pretty much the same, and it ran fine then. I now use Amelia_1.7.2.
After a chain length of 21, I get several lines saying error: inv():
matrix appears to be singular.
I have now already kicked out a variable that was .98 correlated with
another one - that did not solve the problem.
The link to my data set:
https://www.dropbox.com/s/uc2jst4asiwae4h/t1.Rdata
The Rcode:
https://www.dropbox.com/s/33cfk7fqcasngdq/Janz_Darwin_0001.R
The session info is copied below.
I would be very grateful for any hints on what I can improve.
Thank you!
Nicole
--
sessionInfo()
R version 3.0.1
(2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Amelia_1.7.2 RcppArmadillo_0.3.900.0 Rcpp_0.10.3
foreign_0.8-54
loaded via a namespace (and not attached):
[1] tools_3.0.1
--
Nicole Janz, PhD Cand.
Lecturer at Social Sciences Research Methods Centre
University of Cambridge
Department of Politics and International Studies
www.nicolejanz.de | nj248(a)cam.ac.uk | Mobile: +44 (0) 7905 70 1 69 4
Skype: nicole.janz
--
Amelia mailing list served by HUIT
[Un]Subscribe/View Archive:
http://lists.gking.harvard.edu/?info=amelia
More info about Amelia:
http://gking.harvard.edu/amelia
Amelia mailing list
Amelia(a)lists.gking.harvard.edu
To unsubscribe from this list or get other information:
https://lists.gking.harvard.edu/mailman/listinfo/amelia