Thank you very much for you quick reply Olivia. I will do as you suggested.
Best,
Vincent
On Wed, Aug 25, 2010 at 2:25 PM, Olivia Lau <olivia.lau(a)post.harvard.edu> wrote:
Hi, Vincent.
The zelig function is entirely controlled by the classes of the input data
and the model statement. The multiply imputed data from Amelia must be
input using the following syntax:
zelig(fm, data = mi(a.out$imputations[[1]], a.out$imputations[[2]],
a.out$imputations[[3]], a.out$imputations[[4]], a.out$imputations[[5]]),
model="twosls")
because the mi() function in the data call will set the class of the list of
data frames that is input to zelig.
If you use the syntax above in place of the last line of your code, you will
get different estimates (one set of estimates for each imputed data frame).
The summary function does not work with a multi-level MI output from zelig,
however. You'll have to summarize each model separately, or do the Rubin
rules by hand.
Best,
Olivia
On Wed, Aug 25, 2010 at 2:00 PM, Vincent Arel-Bundock <varel(a)umich.edu>
wrote:
Hi,
Thanks for your work on Zelig and Amelia. Very useful!
I can't get a summary when estimating a twosls model on
amelia-imputed data. The object is created and it seems OK. See
example below.
Best,
Vincent Arel-Bundock
-------------------------------------------------------
This example requires the Kmenta data that is distributed with the sem
package:
data(Kmenta)
Kmenta[2,3]<-NA
mu1<-Q ~ P + F + A
mu2<-P ~ D + F + A
inst<-~ D + F + A
fm<-list(mu1=mu1, mu2=mu2, inst=inst)
kmenta.out<-zelig(fm, data=Kmenta, model="twosls")
a.out<-amelia(Kmenta, m = 5)
imputed.out<-zelig(fm, data=a.out$imputations, model="twosls")
summary(imputed.out)
Error in apply(coef1,
1, mean) : dim(X) must have a positive length
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/?info=zelig
Zelig program information:
http://gking.harvard.edu/zelig/
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options: