Hi Donald,
That is quite odd. Is one of the new factor levels empty? You can see
how many observations are in each level using:
summary(a.out$imputations[[1]]$facts_convict)
If one of the "1"s is empty, I think you can get rid of that factor
level by running:
a.out$imputations[[1]]$facts_convict <-
factor(a.out$imputations[[1]]$facts_convict)
Let me know if that works. If not, we can try to locate the bug.
Thanks!
matt.
On Sat, Oct 17, 2009 at 1:10 PM, Donald Braman <dbraman(a)law.gwu.edu> wrote:
Also, Amelia doesn't always produce that odd
result, but it tends to do it
more frequently for some variables than it does for others. I'm happy to
provide data, scripts, etc.
On Sat, Oct 17, 2009 at 10:25 AM, Donald Braman <dbraman(a)law.gwu.edu> wrote:
Hi Folks,
I'm getting some odd levels in my post-imputation data:
levels(as.factor(a.out$imputations[[1]]$facts_convict))
[1] "1"
"1" "2" "3" "4" "5" "6"
The "facts_convict" variable is imputed as ordinal, but the double
"1"s
aren't there prior to imputing:
levels(as.factor(my.data$facts_convict))
[1] "1" "2" "3" "4" "5" "6"
Also, I can't seem to cure this by converting to numeric and back:
levels(as.factor(as.numeric(a.out$imputations[[1]]$facts_convict)))
[1]
"1" "1" "2" "3" "4" "5"
"6"
Not sure how/why the double "1" crept in during imputation. As you can
imagine, ologits end up being odd, with two estimates for "1". Any
thoughts?
Don
Donald Braman
phone: 413-628-1221
http://www.culturalcognition.net/braman/
http://ssrn.com/author=286206
http://www.law.gwu.edu/Faculty/profile.aspx?id=10123 -
Amelia mailing list served by Harvard-MIT Data Center
[Un]Subscribe/View Archive: