Hello!
I just started with zelig and find it very convenient! I played with
mlogit model and I wonder why I have to use as.factor() for dependent
variable y no matter if this is already a factor. I show this with
mexico data bellow with Zelig (Version 2.7-5, built: 2006-12-25)
library(package="Zelig")
data(mexico)
## as shown in documentation
z.out1 <- zelig(as.factor(vote88) ~ pristr + othcok
+ othsocok,
model = "mlogit", data = mexico)
## all OK
## now let us try without as.factor, but specifying y as factor before!
mexico$vote88 <- factor(mexico$vote88)
z.out1 <- zelig(vote88 ~ pristr + othcok + othsocok,
+
model="mlogit", data=mexico)
Error in dimnames(xbig) <- list(vlabel(yn, rep(M, n), M), vlabel(xn,
ncolBlist, :
length of 'dimnames' [1] not equal to array extent
## ???
--
Lep pozdrav / With regards,
Gregor Gorjanc
----------------------------------------------------------------------
University of Ljubljana PhD student
Biotechnical Faculty
Zootechnical Department URI:
http://www.bfro.uni-lj.si/MR/ggorjan
Groblje 3 mail: gregor.gorjanc <at> bfro.uni-lj.si
SI-1230 Domzale tel: +386 (0)1 72 17 861
Slovenia, Europe fax: +386 (0)1 72 17 888
----------------------------------------------------------------------
"One must learn by doing the thing; for though you think you know it,
you have no certainty until you try." Sophocles ~ 450 B.C.
----------------------------------------------------------------------
-
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/