Dear Will,
This is a class problem / bug. The summary function isn't recognizing
that the output of zelig with MI and mixed models has a particular
class, and that the zelig output should be integrated using the Rubin
rules.
In fact, zelig always runs the models separately on each MI data set,
whether the model is a logit model or a logit.mixed model. The model
output is combined using the Rubin rules in the summary function.
When simulations are drawn, for N simulations, N/M simulations are
drawn from each of the M models generated from the M imputed data
sets.
I'll see what we can do about the bug for logit.mixed in summary.
Best,
Olivia
On Tue, Jun 30, 2009 at 10:34 AM, Will Bullock<wbullock(a)princeton.edu> wrote:
Hello,
It appears as though Zelig has trouble integrating multiple datasets
when using a "logit.mixed" model within R. I'm hoping someone can verify
the
problem and possibly suggest a work-around.
I've uploaded a sample dataset at
www.princeton.edu/~wbullock/sampleData.RData and here is a bit of code.
library(Amelia)
library(Zelig)
load("sampleData.RData")
X <- amelia(sampleData, idvars=c("st"), noms=c("female",
"imports"),
ords=c("age", "edu", "inc"))
fit.1 <- zelig(imports ~ age + edu + female,
data=mi(X$imputations[[1]],X$imputations[[2]],X$imputations[[3]]), model =
"logit")
summary(fit.1)
fit.2 <- zelig(imports ~ tag(1|age) + tag(1|edu) + tag(1|female),
data=mi(X$imputations[[1]],X$imputations[[2]],X$imputations[[3]]), model =
"logit.mixed")
summary(fit.2) #generates error
fit.2
The multiple imputation seems to work just fine, as does the first Zelig
model using a standard logistic model. But the second Zelig model does not
properly integrate the datasets. Instead it simply runs the model on each
dataset separately.
Any thoughts or suggestions on the matter would be greatly appreciated.
Thank you,
--Will Bullock
-
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/