[R] Logistic Regression in Zelig

Mathew, Abraham T amathew at ku.edu
Sat Jun 19 19:43:58 CEST 2010



I'm running a logit model using the zelig package in R:

z.out <- zelig(trade961a ~ age962 + education962 + personal962 + economy962 + partisan962 + employment962 + union962 + home962 + market962 + race962 + income962, data=data96, model="logit")

The dependent variable, trade961a, is a dichotomous factor variable. All other variables are numeric.

I am interested in personal962, which is:

> str(personal962)
 num [1:1714] 3 3 1 1 1 2 3 2 2 1 ...

so I run the following to simulate the probability of supporting international trade when personal962 is 1 (better):
 
x.out <- setx(z.out, personal962=1)

I get the following error message:

#Error in dta[complete.cases(mf), names(dta) %in% vars, drop = FALSE] : 
#  incorrect number of dimensions



Any ideas on what I'm doing wrong?

Thanks
Abraham M.



More information about the R-help mailing list