Hi,
This probably is a bug in zelig(). Would you mind sending me your data
file or subset of it?
Thanks,
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
-----------------------------------------------------
On Fri, 9 Jun 2006, Christopher N. Lawrence wrote:
When I attempt to supply a long variable list as part
of the formula
in zelig(), I am getting an error:
z.mod92.a <- zelig(as.factor(presvote) ~
whitesouth + relft + soph2 +
pid + age + unionhh + black + married + female, model='mlogit',
data=smallframe)
Error in parse(file, n, text, prompt) : syntax error in
"cbind(
id(presvote, "2") ~ whitesouth + relft + soph2 + pid + age + ,"
Removing one variable, however, solves the problem:
z.mod92.a <- zelig(as.factor(presvote) ~
whitesouth + relft + soph2 +
pid + age + unionhh + black + married, model='mlogit',
data=smallframe)
Changing the variables involved seems to make no difference; it is
apparently just the length of the variable list that matters.
Incidentally, I can run the model fine using vglm (through VGAM)
directly.
traceback() says:
12: parse(text = x)
11: eval(parse(text = x)[[1]])
10: formula(eval(parse(text = x)[[1]]))
9: switch(mode(x), "NULL" = structure(NULL, class = "formula"),
character = formula(eval(parse(text = x)[[1]])), call = eval(x),
stop("invalid formula"))
8: formula.default(object, env = baseenv())
7: formula(object, env = baseenv())
6: as.formula(paste(lhs, rhs))
5: cmvglm(formula, mf$model, mf$ones, ndim, data, fact)
4: zelig2mlogit(as.factor(presvote) ~ whitesouth + relft + soph2 +
pid + age + unionhh + black + married + female,
"mlogit", list(weight = c(1.7249, 0.4922, 1.1457, ....)), 1)
3: do.call(fn1, list(formula, model, dat, N, ...))
2: zelig.default(as.factor(presvote) ~ whitesouth + relft + soph2 +
pid + age + unionhh + black + married + female,
model = "mlogit", data = smallframe)
1: zelig(as.factor(presvote) ~ whitesouth + relft + soph2 + pid +
age + unionhh + black + married + female,
model = "mlogit", data = smallframe)
Thanks in advance,
Chris
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: