Hello all,
I tried to estimate a multinomial logit using zelig, mlogit. My problem is
that I do not know how to determine the base variable. I red in the mailing
archive from last year, that in the case of one formula the baseline is the
last for numeric endogenous variables. But the case of different formula for
each level is not mentioned so I expected that the number, which is not
included in the formulas is the baseline. So I tried the examples on
http://gking.harvard.edu/zelig/docs/Examples21.html
<http://gking.harvard.edu/zelig/docs/Examples21.html>
and changed in the case of different formula for each level the levels, but
the results didn't change.
Here is the "unchanged" example output:
data(mexico)
z.out2 <- zelig(list(id(vote88, "1") ~
pristr + othcok,
+ id(vote88, "2") ~ othsocok),
+ model = "mlogit", data = mexico)
summary(z.out2)
Call:
zelig(formula = list(id(vote88, "1") ~ pristr + othcok, id(vote88,
"2") ~ othsocok), model = "mlogit", data = mexico)
Pearson Residuals:
Min 1Q Median 3Q Max
log(mu[,1]/mu[,3]) -4.1 -0.72 0.29 0.738 2.0
log(mu[,2]/mu[,3]) -2.1 -0.47 -0.21 -0.086 4.6
Coefficients:
Value Std. Error t value
(Intercept):1 2.20 0.276 8.0
(Intercept):2 -0.40 0.218 -1.9
pristr 0.66 0.077 8.6
othcok -1.19 0.091 -13.2
othsocok 0.21 0.138 1.5
Number of linear predictors: 2
Names of linear predictors: log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
Dispersion Parameter for multinomial family: 1
Residual Deviance: 2367 on 2713 degrees of freedom
Log-likelihood: -1183 on 2713 degrees of freedom
Number of Iterations: 4
And for this run I have substituted in the second formula the 2 by a 3. But
the output didn't change.
z.out2 <- zelig(list(id(vote88, "1") ~ pristr + othcok,
+ id(vote88, "3") ~ othsocok),
+ model = "mlogit", data = mexico)
summary(z.out2)
Call:
zelig(formula = list(id(vote88, "1") ~ pristr + othcok, id(vote88,
"3") ~ othsocok), model = "mlogit", data = mexico)
Pearson Residuals:
Min 1Q Median 3Q Max
log(mu[,1]/mu[,3]) -4.1 -0.72 0.29 0.738 2.0
log(mu[,2]/mu[,3]) -2.1 -0.47 -0.21 -0.086 4.6
Coefficients:
Value Std. Error t value
(Intercept):1 2.20 0.276 8.0
(Intercept):2 -0.40 0.218 -1.9
pristr 0.66 0.077 8.6
othcok -1.19 0.091 -13.2
othsocok 0.21 0.138 1.5
Number of linear predictors: 2
Names of linear predictors: log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
Dispersion Parameter for multinomial family: 1
Residual Deviance: 2367 on 2713 degrees of freedom
Log-likelihood: -1183 on 2713 degrees of freedom
Number of Iterations: 4
So, what have I done wrong?
Thank you in advance!
Joerg Mueller-Scheessel