Dear Amelia Listers
I have a data set which gives me the counts of a number of religious groups, in 3 cities
for 60 years. I use these counts to generate an index for religious diversity in each
available year.
I had missing data, which I imputed using AmeliaII in R. I included both the counts and
the index to generate the imputed values, and then used the "new" counts to
generate the index again (overwriting the imputed index). I also generated a number of
other variables using the index (squared, interactions etc). I gather the originally
imputed data and my new variables using:
##### begin code #####
a.out.final <- a.out
for(i in 1:10){
<create new variables>
a.out.final$imputatations[[i]] <- cbind(a.out$imputations[[i]], <new
variables>)
}
##### end code #####
where a.out is the original Amelia output. This works fine, as far as I can see. however,
when I now ask for a summary(a.out.final), I get an error message. The first past of the
message is the same as for summary(a.out), but then I get:
Fraction Missing for individual variables:
-----------------------------------------
Error in `row.names<-.data.frame`(`*tmp*`, value = c("cityid",
"year", :
invalid 'row.names' length
("cityid" and "year" are obviously my panel/time indicators )
Does this mean that I have made a mistake, or am trying to do something that cannot be
done? Or is it simply due to the fact that Zelig can no longer recognise what was
originally missing and what not? I am new to R and Zelig, and such (unintelligible) error
messages scare me!
Thanks again for your time,
Matthijs de Zwaan
-
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