I'm attempting to use AmeliaII in the following way:
vars_to_impute <- gundata[,c("progun", "egalitarianism", "individualism",
"crfear", "victim", "female", "RACE",
"income", "URBANKID", "URBANNOW",
"RELIGION", "iss", "democrat", "conservative")]
imputed <- amelia(data=vars_to_impute, p2s=2,
noms=c("RACE","RELIGION","URBANKID","URBANNOW"),
outname="imputation", ords=c("democrat", "conservative")
The problem that I run into is that in about half of the imputation attempts
fail due to non-invertible covariance matrices. I'm curious if there is any
way to deal with this aside from removing the most highly covariant
variables? For example, given that it produces imputed data about 1/5 of
the time, would it be acceptable to use successful imputations? E.g., can I
just set m=100 and use as many imputations as I like from the resulting set
of ~25 imputations?
If I do need to remove the covariate variables, do you know of a simple way
to check for that among a given set of variables?
I'm attempting to do imputation using the following command line:
amelia(jan, m=5, p2s=2, empri=0, tolerance=0.0001, startvals=1,
archive=TRUE, incheck=T, ords=c("v1", "v2", "v3", "v4", "v5", "v7",
"vv1", "vv2", "vv3", "vv4", "vv5", "vv7"), collect=FALSE, outname="jan",
write.out=TRUE, keep.data=TRUE)
The problem I'm running into is that every time I run this command, v5
does not get imputed. I have the exact same number of missing
observations of v5 after the imputation as before. I get the following
warning message:
Warning message:
In rbinom(nrow(x.orig), ordrange[k], p[, k]) : NAs produced
On a separate and less important note, is there a way when using the R
command line to prevent Amelia from printing the data in the R console?
I want to save the datasets but not print them in the R window.
Thank you in advance for any help you can give,
Steve Shewfelt
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
Hello All,
How should I mark missing values in Tab Delimited text file?
I have tried different variants but all was in vain.
Best regards,
Vadim Ayuyev
Temple University
CIS Department Ph.D. student
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia