If you use multiply-imputed data sets, zelig() will run the model on each
imputed data set and returns an output, which is a list. You can extract
each output by, for example,
z.out[[1]]
If you want coefficients for the model fitted to the second imputed
data set, then you can do
z.out[[2]]$coef
etc.
Kosuke
-----------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics eFax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012
http://imai.princeton.edu
-----------------------------------------------------
On Fri, 23 Feb 2007, Anders Schwartz Corr wrote:
Hi Kosuke,
Olivia is in NZ ... do you know how to check my residuals on Zelig with
multiply imputed datasets? This can wait until Olivia returns. See below.
Thanks,
Anders
---------- Forwarded message ----------
Date: Fri, 23 Feb 2007 21:45:56 +1300
From: Olivia Lau <olau(a)fas.harvard.edu>
To: Anders Schwartz Corr <corr(a)fas.harvard.edu>
Subject: Re: question
that's because you did it on multiply imputed datasets. I'm in New
Zealand right now and I can't do anything about this -- I don't have
server access. why don't you email kosuke? Thanks, O
On 2/23/07, Anders Schwartz Corr <corr(a)fas.harvard.edu> wrote:
Hi Olivia,
Not sure how to get my residuals. My attempts are below. z.out$coef does
not seem to work as stated on the Zelig website:
http://gking.harvard.edu/zelig/docs/Output_Values12.html
Thanks
Anders
summary(z.out)
Model: normal
Number of multiply imputed data sets: 5
Combined results:
Call:
zelig(formula = ncc13 ~ p_norm_total + exp(p_norm_total) + year +
demo + exp(demo) + fed + exp(fed) + gpconcsq + dems6/num_stat +
cinc/ter + tradeope_log + elf85 + contgain.merge1 + contlose.loser +
gdpcap_1000 + popden_1000 + upopprct, model = "normal", data =
imputeddata2)
Coefficients:
Value Std. Error t-stat p-value
(Intercept) 7.382e+03 6.915e+04 0.10675 0.91610
p_norm_total 4.843e+04 5.326e+04 0.90934 0.38935
exp(p_norm_total) -2.542e+04 3.274e+04 -0.77664 0.45650
year 2.518e+01 5.001e+01 0.50357 0.62875
demo 4.535e+02 2.117e+02 2.14225 0.04859
exp(demo) -1.017e-05 2.182e-05 -0.46599 0.65098
fed 3.298e+03 5.756e+03 0.57305 0.57427
exp(fed) -1.155e+02 2.024e+03 -0.05706 0.95517
gpconcsq -3.302e+04 7.125e+04 -0.46345 0.65814
dems6 -2.208e+02 3.382e+02 -0.65297 0.52256
cinc 9.043e+03 4.292e+04 0.21071 0.83599
tradeope_log 1.313e+03 4.798e+03 0.27359 0.79499
elf85 -3.891e+03 5.399e+03 -0.72059 0.48722
contgain.merge1 2.395e+03 7.210e+03 0.33219 0.75379
contlose.loser 3.303e+03 8.207e+03 0.40240 0.70557
gdpcap_1000 2.160e+02 3.654e+02 0.59115 0.57263
popden_1000 2.958e+01 2.937e+02 0.10073 0.92011
upopprct -1.024e+04 3.053e+04 -0.33538 0.75185
dems6:num_stat -1.577e-01 2.414e+00 -0.06532 0.94923
cinc:ter 2.498e+02 4.654e+02 0.53669 0.60042
For combined results from datasets i to j, use summary(x, subset = i:j).
For separate results, use print(summary(x), subset = i:j).
z.out$coef
NULL
z.out$residuals
NULL
summary(residuals)
Error in object[[i]] :
object is not subsettable
residuals
function (object, ...)
UseMethod("residuals")
<environment: namespace:stats>
-
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/