Using R 2.4.0 and Zelig 2.7-4 (and VGAM 0.7-1), I am still having
problems with summary() on the mlogit model; the error is as follows:
Error in apply(coef, 1, mean) : dim(X) must have a positive length
After some investigation using R's debugging facilities (e.g.
options(error=recover)), I have traced the problem back to the
summary.MI() method. Further debugging shows that instead of
summary(object[[i]]) returning the summary of the vglm object, it's
instead returning this:
Browse[1]> summary(object[[1]])
Length Class Mode
1 ZeligS4vglm S4
Apparently the generic summary for this object isn't getting mapped
through to summary.vglm; if I use summary.vglm directly, it works:
Browse[1]> summary.vglm(object[[1]])
Call:
zelig(formula = as.factor(presvote) ~ whitesouth + black + female +
married + I(married == 1 & female == 1) + wbornagain + age +
I(pid - 3) + battleground + relft + soph2 + I(battleground *
soph2) + I(soph2 * relft) + I(soph2 * relft * battleground),
model = "mlogit", data = midata)
Pearson residuals:
Min 1Q Median 3Q Max
log(mu[,1]/mu[,3]) -7.327 -0.2884 -0.06965 0.3821 14.952
log(mu[,2]/mu[,3]) -11.632 -0.2812 -0.04343 0.4124 7.117
Coefficients:
Value Std. Error t value
(Intercept):1 -1.633278 0.822113 -1.9867
(Intercept):2 -2.064621 0.795693 -2.5947
whitesouth1:1 0.624704 0.222456 2.8082
whitesouth1:2 0.150883 0.226140 0.6672
black:1 0.720394 0.643519 1.1195
black:2 2.537694 0.542923 4.6741
female1:1 0.775261 0.302972 2.5589
female1:2 0.189784 0.278503 0.6814
married1:1 0.358601 0.259473 1.3820
married1:2 -0.776895 0.247297 -3.1415
I(married == 1 & female == 1)TRUE:1 -0.509660 0.363874 -1.4006
I(married == 1 & female == 1)TRUE:2 0.465074 0.349528 1.3306
wbornagain:1 0.123379 0.189801 0.6500
wbornagain:2 -0.577009 0.207006 -2.7874
age:1 0.009947 0.005268 1.8883
age:2 0.013316 0.005192 2.5649
I(pid - 3):1 0.494365 0.051809 9.5421
I(pid - 3):2 -0.595157 0.050187 -11.8588
battleground:1 0.517576 0.572568 0.9040
battleground:2 0.947443 0.543689 1.7426
relft:1 -0.036277 0.012328 -2.9427
relft:2 -0.038707 0.011663 -3.3189
soph2:1 0.306666 0.310355 0.9881
soph2:2 0.834475 0.303375 2.7506
I(battleground * soph2):1 -0.204041 0.229117 -0.8906
I(battleground * soph2):2 -0.340621 0.222158 -1.5332
I(soph2 * relft):1 -0.012713 0.006911 -1.8395
I(soph2 * relft):2 -0.011077 0.006589 -1.6812
I(soph2 * relft * battleground):1 0.006114 0.003622 1.6879
I(soph2 * relft * battleground):2 0.008427 0.003373 2.4983
Number of responses: 2
Names of responses:
log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
Residual Sum of Squares: 3792 on 3286 degrees of freedom
Hope this helps,
Chris
--
Christopher N. Lawrence <clawren6(a)slu.edu>
Assistant Professor of Political Science (non-tenure-track)
Saint Louis University
109 Fitzgerald Hall
3500 Lindell Boulevard
St. Louis, Missouri 63103-1021
Website:
http://www.cnlawrence.com/
-
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/