On Thu, Feb 11, 2010 at 12:09 AM, Kosuke Imai
<kimai(a)princeton.edu> wrote:
Can you try doing as.factor() outside of the
formula? That is,
miset1$ssimportant <- as.factor(miset1$ssimportant)
etc. for each data set. If this does not solve the problem, please let us
know.
Thanks,
Kosuke
Department of Politics
Princeton University
http://imai.princeton.edu
On Feb 10, 2010, at 11:16 PM, Donald Braman wrote:
I've started to get this error when I run
setx:
Error in dta[complete.cases(mf), names(dta) %in% vars, drop = FALSE] :
incorrect number of dimensions
Any ideas as to why?
Here's an example:
> z.out <- zelig(formula="as.factor(ssimportant) ~ egalitarianism +
individualism ", model="ologit",
data=mi(c(miset1,miset2,miset3,miset4,miset5)))
How to cite this model in Zelig:
Kosuke Imai, Gary King, and Oliva Lau. 2007. "ologit: Ordinal Logistic
Regression for Ordered Categorical Dependent Variables" in Kosuke Imai, Gary
King, and Olivia Lau, "Zelig: Everyone's Statistical Software,"
http://gking.harvard.edu/zelig
summary(z.out)
Call:
zelig(formula = "as.factor(ssimportant) ~ egalitarianism + individualism
",
model = "ologit", data =
mi(c(miset1, miset2, miset3, miset4,
miset5)))
Coefficients:
Value Std. Error t value
egalitarianism -0.1078 0.06161 -1.749
individualism -0.1054 0.06724 -1.567
Intercepts:
Value Std. Error t value
1|2 -2.682 0.473 -5.673
2|3 -2.037 0.470 -4.334
3|4 -1.406 0.468 -3.002
4|5 -0.416 0.468 -0.890
5|6 0.701 0.469 1.495
Residual Deviance: 5568.83
AIC: 5582.83
x.out <- setx(z.out)
Error in dta[complete.cases(mf), names(dta) %in% vars,
drop = FALSE] :
incorrect number of dimensions
--
Donald Braman
phone: 413-628-1221
http://www.culturalcognition.net/braman/
http://ssrn.com/author=286206
http://www.law.gwu.edu/Faculty/profile.aspx?id=10123