Now it worked! It was an stata database, readed using "foreign". I
converted the data to csv. Problem solved.
Thank you, Matt.
2012/3/2 Matt Owen <mowen(a)iq.harvard.edu>
The only other though that I have is that
"pda" is not a standard
data.frame object. If this is the case, you may have to restructure the
data set before using it with the logit model.
On Mar 2, 2012, at 10:54 AM, Rogério Barbosa wrote:
Hi Matt,
Thanks for your help! But, unfortunately, it didn't work. The error keep
happening even if I use just one independent variable.
For instance:
x.out = setx(z.out, age=mean)
*Error in
dta[complete.cases(mf), names(dta) %in% vars, drop = FALSE] : *
* incorrect number of dimensions*
Just an observation: it stated to occur suddenly. The day before the model
was working fine.
- - - - -
Rogério J. Barbosa
Researcher at Centre for Metropolitan Studies/Cebrap
São Paulo - Brazil
2012/3/2 Matt Owen <mowen(a)iq.harvard.edu>
My best guess is that the error occurs because
the values for "gender"
and "race.white" have a different length than "age" and
"age2"
Try something like:
setx(z.out, age=age.sim, age2=age2.sim, gender=rep(0, length(age.sim)),
race.white=rep(1, length(age.sim)))
On Mar 1, 2012, at 11:06 PM, Rogério Barbosa wrote:
Hey all,
I get this error when I run setx: "Error in dta[complete.cases(mf),
names(dta) %in% vars, drop = FALSE] : incorrect number of dimensions"
I found some people with the same problem on internet - but apparently no
one has worked it out.
Does anyone know how to solve it?
My output is bellow the message.
Thanks,
Rogério Barbosa
z.out = zelig(t1 ~ age + age2 + gender +
race.white, model = "logit",
data = pad)
How to cite this model in Zelig:
Kosuke Imai, Gary King, and Oliva Lau. 2008. "logit: Logistic Regression
for Dichotomous Dependent Variables" in Kosuke Imai, Gary King, and Olivia
Lau, "Zelig: Everyone's Statistical Software,"
http://gking.harvard.edu/zelig
age.sim=6:19
age2.sim=age.sim^2
x.out <- setx(z.out, age=age.sim,
age2=age2.sim, gender=0, race.white=1)
*Error in dta[complete.cases(mf), names(dta)
%in% vars, drop = FALSE] : *
* incorrect number of dimensions*
Rogério J. Barbosa
Researcher at Centre for Metropolitan Studies/Cebrap
São Paulo - Brazil
-
--
Zelig Mailing List, served by HUIT
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/mailman/listinfo/zelig
Zelig program information:
http://gking.harvard.edu/zelig/
Zelig mailing list
Zelig(a)lists.gking.harvard.edu
https://lists.gking.harvard.edu/mailman/listinfo/zelig
-
--
Zelig Mailing List, served by HUIT
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/mailman/listinfo/zelig
Zelig program information:
http://gking.harvard.edu/zelig/
Zelig mailing list
Zelig(a)lists.gking.harvard.edu
https://lists.gking.harvard.edu/mailman/listinfo/zelig
-
--
Zelig Mailing List, served by HUIT
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/mailman/listinfo/zelig
Zelig program information:
http://gking.harvard.edu/zelig/
Zelig mailing list
Zelig(a)lists.gking.harvard.edu
https://lists.gking.harvard.edu/mailman/listinfo/zelig
-
--
Zelig Mailing List, served by HUIT
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/mailman/listinfo/zelig
Zelig program information:
http://gking.harvard.edu/zelig/
Zelig mailing list
Zelig(a)lists.gking.harvard.edu
https://lists.gking.harvard.edu/mailman/listinfo/zelig