Hi Wayne,
After taking a look at your data, it looks like you have about 50 or
so variables that don't vary all marked as "nominals." You'll have to
put those variables into the idvars argument to keep them out of the
imputations.
Here is the code I used to find the problematic variables, along with
their column numbers, for your reference.
jj <- list()
for (i in 1:ncol(DATA8i)) jj[i] <- length(unique(na.omit(DATA8i[,i])))
jj <- unlist(jj)
which(jj==1)
[1] 44 46 47 48 49 52 53 54 55 56 61 62 105 141 146 148
151 165 172
[20] 174 179 239 244 245 246 247 248 249 250 251 253 254 257 259 260 269 270 271
[39] 275 278 283 285 287 288 289 290 302 303 304 309
One more thing you should consider is that you will probably not be
able to impute 600+ variables with only 1000 observations. Remember
that if p is the number of variables, then Amelia has to estimate
roughly p^2/2 parameters.
I hope this helps,
matt.
On Wed, Aug 26, 2009 at 12:09 AM, Wayne
Thornton<thornton(a)fas.harvard.edu> wrote:
Matt---
I'm getting an error message I haven't seen before...
"Error in newx[, j - 1] <- ifelse(x[, i] == values[j], 1, 0) :
subscript out of bounds"
-------------------------------------------
My settings are as follows:
impruns <- 5
tolerX <- 1.0E-4
autopriX <- 0.05
empriX <- round( 0.005* colDATA8* rowDATA8, digits= 0)
imputed <- amelia(DATA8i,
m = impruns , p2s = 2 ,
idvars = c(3,4,5) ,
ts = 1 , cs = 2 , polytime = NULL,
startvals = 0 ,
tolerance = tolerX ,
noms
= nomIV8ji ,
ords = ordIV8ji, incheck = T , collect = F ,
outname = "DATA8imp",
write.out = T , archive = T ,
keep.data = T ,
empri = empriX ,
autopri = autopriX ,
bounds = IVlims, max.resample =
resampleX )
The input files are attached.
-------------------------------------------
Thanks much for your help…
Wayne
Wayne A. Thornton
Harvard University
thornton(a)fas.harvard.edu
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive:
http://lists.gking.harvard.edu/?info=amelia
More info about Amelia:
http://gking.harvard.edu/amelia