Hello
I got rid of all warnings unrelated to the Amelia error: Some of the
noms-specified variables had more than 10 levels (e.g., country codes),
so I moved them to idvars.
I think, however, that Amelia should behave differently in cases where a
fully observed nominal variable has more than 10 levels. Because now, I
had to remove complete and informative variables (like country codes)
from the imputation input and put them to the idvars list, which is not
considered for the imputation process.
This way, I am losing imputation information because Amelia forces the
removal of a fully observed nominal variable "only" because it has >10
levels. Shouldn't the fact of having fully observed variables take
precedence before the number of levels? -- Is there another possibility
to include these variables in the imputation input?
Finally, the error message (and a related warning) is still there:
+
outname="Routput/imputed", write.out=TRUE,empri=NULL)
amelia starting
Fehler in if (any(unique(na.omit(data[, i]))%%1 != 0)) { :
Fehlender Wert, wo TRUE/FALSE nötig ist
Zusätzlich: Warning message:
'%%' is not meaningful for ordered factors in:
Ops.ordered(unique(na.omit(data[, i])), 1)
TIA,
Marcus
Am 25.02.2008 12:14 schrieb Marcus M. Dapp:
Hello everybody
Thanks to Levi and Matt, I am clear now about the numeric/ords/noms
assigning and I am also using the whole dataset (N=2441).
But when I call Amelia, I still get that error message and a few warnings:
- The error message says "Missing value, where T/F was expected.", but
Amelia does not specify -where- this happens. I ran traceback() right
after but the output is not telling me much either (see below). How can
I locate more precisely where Amelia stumbles?
- Re the warnings: What is the problem if nominal variables have more
than 10 categories?
Thank you very much for your help,
Marcus
PS. I can provide more details on the Amelia call if needed.
# CALL
am <-
amelia(mdi,m=5,p2s=0,idvars=skip,noms=noms,ords=ords,collect=FALSE,
+
outname="Routput/imputed", write.out=TRUE,empri=NULL)
Fehler in if (any(unique(na.omit(data[, i]))%%1 != 0)) { :
Fehlender Wert, wo TRUE/FALSE nötig ist
Additional: Warning messages:
1:
The number of catagories in one of the variables marked nominal has
greater than 10 categories. Check nominal specification.
in: amcheck(data = data, m = m, idvars = numopts$idvars, priors = priors,
2:
... (dto. up to 5: )
6: '%%' is not meaningful for ordered factors in:
Ops.ordered(unique(na.omit(data[, i])), 1)
# TRACEBACK
traceback()
3: amcheck(data = data, m = m, idvars = numopts$idvars, priors = priors,
empri = empri, ts = numopts$ts, cs = numopts$cs, tolerance =
tolerance,
casepri = casepri, polytime = polytime, lags = numopts$lags,
leads = numopts$leads, logs = numopts$logs, sqrts = numopts$sqrts,
lgstc = numopts$lgstc, p2s = p2s, frontend = frontend, archive =
archive,
intercs = intercs, noms = numopts$noms, startvals = startvals,
ords = numopts$ords, collect = collect, outname = outname,
write.out = write.out)
2: amelia.prep(data = data, m = m, idvars = idvars, empri = empri,
ts = ts, cs = cs, tolerance = tolerance, casepri = casepri,
polytime = polytime, lags = lags, leads = leads, logs = logs,
sqrts = sqrts, lgstc = lgstc, p2s = p2s, frontend = frontend,
archive = archive, intercs = intercs, noms = noms, startvals =
startvals,
ords = ords, incheck = incheck, collect = collect, outname =
outname,
write.out = write.out, arglist = arglist, priors = priors,
autopri = autopri)
1: amelia(mdi, m = 5, p2s = 0, idvars = skip, noms = noms, ords = ords,
collect = FALSE, outname = "Routput/imputed", write.out = TRUE,
empri = NULL)
--
Marcus M. Dapp | PhD student | ETH Zurich |
Prof. Thomas Bernauer, International Relations |
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: