[R] Question about 'logit' and 'mlogit' in Zelig
Matthew Dowle
mdowle at mdowle.plus.com
Wed Mar 31 16:52:43 CEST 2010
Abraham,
This appears to be your 3rd unanswered post to r-help in March, all 3 have
been about the Zelig package.
Please read the posting guide and find out the correct place to send
questions about packages. Then you might get an answer.
HTH
Matthew
"Mathew, Abraham T" <amathew at ku.edu> wrote in message
news:281F7A5FDFEF844696011CB21185F8AC0BE7ED at MAILBOX-11.home.ku.edu...
I'm running a multinomial logit in R using the Zelig packages. According to
str(trade962a), my dependent variable is a factor with three levels. When I
run the multinomial logit I get an error message. However, when I run
'model=logit' it works fine. any ideas on whats wrong?
## MULTINOMIAL LOGIT
anes96two <- zelig(trade962a ~ age962 + education962 + personal962 +
economy962 + partisan962 + employment962 + union962 + home962 + market962 +
race962 + income962, model="logit", data=data96)
summary(anes96two)
#Error in attr(tt, "depFactors")$depFactorVar :
# $ operator is invalid for atomic vectors
## LOGIT
Call:
zelig(formula = trade962a ~ age962 + education962 + personal962 +
economy962 + partisan962 + employment962 + union962 + home962 +
market962 + race962 + income962, model = "logit", data = data96)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.021 -1.179 0.764 1.032 1.648
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.697675 0.600991 -1.161 0.2457
age962 0.003235 0.004126 0.784 0.4330
education962 -0.065198 0.038002 -1.716 0.0862 .
personal962 0.006827 0.072421 0.094 0.9249
economy962 -0.200535 0.084554 -2.372 0.0177 *
partisan962 0.092361 0.079005 1.169 0.2424
employment962 -0.009346 0.044106 -0.212 0.8322
union962 -0.016293 0.149887 -0.109 0.9134
home962 -0.150221 0.133685 -1.124 0.2611
market962 0.292320 0.128636 2.272 0.0231 *
race962 0.205828 0.094890 2.169 0.0301 *
income962 0.263363 0.048275 5.455 4.89e-08 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 1841.2 on 1348 degrees of freedom
Residual deviance: 1746.3 on 1337 degrees of freedom
(365 observations deleted due to missingness)
AIC: 1770.3
Number of Fisher Scoring iterations: 4
Thanks
Abraham
More information about the R-help
mailing list