Hi Clayton,
No, unfortunately you can't set one variable to something (e.g.,
phone.contact=0) and fn=NULL for the rest. So I would recommend setting
fn=NULL, and then manipulating the output 'manually':
#in clayton's example phone.contact is the in the third column (the first
#is the intercept)
set.0 <- setx(prob.1, fn=NULL)
set.0[,3] <- 0
Best,
Ian
On Tue, 25 Apr 2006, Clayton Nall wrote:
Hello all,
I've been trying to use the zelig setx() function on part e), and can't seem
to get it to assign 0 and 1 values to the phone.contact() field. I'm sure
this is some silly syntax error. Any ideas?
Thanks,
Clayton
prob.1<-zelig(voted98~household+phone.contact+vote96+democrat+agegp,
data=match.data(m.out), model="probit")
set.0<-setx(prob.1, phone.contact=0, fn=NULL)
(Intercept) household phone.contact vote96 democrat
Min. :1 Min. :1.00 Min. :0.0 Min. :0.000 Min.
:0.000
1st Qu.:1 1st Qu.:1.00 1st Qu.:0.0 1st Qu.:0.000 1st Qu.:1.000
Median :1 Median :2.00 Median :0.5 Median :1.000 Median :1.000
Mean :1 Mean :1.53 Mean :0.5 Mean :0.719 Mean :0.806
3rd Qu.:1 3rd Qu.:2.00 3rd Qu.:1.0 3rd Qu.:1.000 3rd Qu.:1.000
Max. :1 Max. :2.00 Max. :1.0 Max. :1.000 Max. :1.000
agegp
Min. :1.00
1st Qu.:2.00
Median :3.00
Mean :2.91
3rd Qu.:4.00
Max. :4.00