IQSS / Zelig

A statistical framework that serves as a common interface to a large range of models

Home Page:http://zeligproject.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

extracting individual (or pooled) imputed datasets

nmbrodnax opened this issue · comments

Email from a user:

I have imputed twenty datasets using Amelia, and subsequently used Zelig to perform a logit GEE analysis on the datasets. This works very well, but I would now like to do some model selection using QIC or MLIC. There appear to be some packages available in R which will give me QIC values, but they do not seem to work on a Zelig object. Is there a method of extracting individual (or pooled) imputed datasets from Zelig as, for example, geeglm objects, in order to use these packages for calculation of QIC?

from_zelig_model would be my place to start. It extracts the fitted model object from the zelig object.

However, I haven't tested it in this case. So please give it a shot and report back.

Yep, this worked a treat thankyou. The from_zelig_model extracted the fitted models, and then I used the following function from the MESS package to get the QIC:

ExtWisModel<-from_zelig_model(GeeWisModel)
QIC(ExtWisModel[[1]])

where 1 is the 1st imputed dataset of the twenty.

Many thanks!!!!!

Glad to hear the solution worked!