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 |
www.ib.ethz.ch/people/mdapp
Prof. Thomas Bernauer, International Relations |
www.ib.ethz.ch
On the shoulders of giants?
http://science.creativecommons.org
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive:
http://lists.gking.harvard.edu/?info=amelia