On Thu, 30 Aug 2007, Glenys Lafrance wrote:
I am trying to set variable options for 41 variables.
25 are ordinal, the
remainder are ID variables. I'm getting the following message:
First off, you might not need to declare variables as ordinal. Generally
you only need to do this for variables that are going to be used in an
analysis model that requires ordinality (like a Logit, Poisson, Ordered
Probit, and the like), and even then, only for the Dependent variable.
(Remember, Nominal variables are another matter, and always need to be
declared.) It might seem unintuitive to allow imputations to have a space
that is not the same as the original data, but if you are rounding the
imputations you are losing information. An imputation of .51 on a
dichotomous variable tells you that in that imputed dataset, the
imputation was nearly as likely to be a 1 as a 0. Very few models require
right hand side variables to be ordinal, although it may make graphs look
more intuitive.
Anyway, not to deny your question, it seems like something might be wrong
in the way you are setting either
the "ords" or "idvars" arguments. We have a list of checks to try to
catch common errors (and I make most of them myself, commonly) but there
are always interesting ways to define these arguments in ways that are
logically incompatible, that we've yet to think of. Just check over them
one more time. In the latest version of Amelia you can set them either by
using the a vector of the column number, or a vector of variable names.
The latter is less likely to trip you up. This is all assuming you are
using R code of your own, and not using the AmeliaView interface, which
ought not to allow you to do anything you can't do. Let me know if you
don't find your error, or are certain you've set things out right. We try
to write in useful error messages, but whatever event occured did not trip
one.
"error in unsubset(x.orig = prepped$trans.x,
x.imp = ximp, blanks =
prepped$blanks, :
subscript out of bounds". Is there something I can do to
proceed.
Also, is there a way to round an imputed data point to the closest observed
value? Thanks in advance,
There is not something built in to do this, although declaring variables
as Ordinal will make certain that the imputations take integer values (if
the original data is integer). But it does not do this by rounding.
regards,
James Honaker
-
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive:
http://lists.gking.harvard.edu/?info=amelia