1)What exactly does the setx and sim commands do? I understand that
setx sets the different predictors to different levels, and that these
values are used for the simulation. Would this be the same as plugging
the same values into the regression model with their associated betas
and calculate Y using linearhypothesis (from the car-library) or is
the sim command doing something entirely different?
2)Also, How can I do cox regression diagnostics using zelig? I get an
error msg after doing
zelig.p2<-zelig(Surv(month,as.numeric(status))~A+B+C+D+E,model="coxph",data=p.match)
plot(zelig.p2)
Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' is a list, but does not have components 'x' and 'y'
3)Also when I try
x0<-setx(zelig.p2,A=0,C=60)
x1<-setx(zelig.p2,B=1,C=60)
sim.a<-sim(zelig.p2,x=x0,x1=x1)
the following happens:
Error in eval(expr, envir, enclos) : object 'B' not found
despite doing
str(p.match$B)
Factor w/ 2 levels "O","P": 1 1 2 1 2 2 2 2 1 1 ...
//M
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/?info=zelig
Zelig program information:
http://gking.harvard.edu/zelig/