Hi, I have a coxph model like coxph(Surv(start, stop, censor) ~ x + y, mydata) I would like to calculate the Schoenfeld residuals for the null, i.e the same model where the beta hat vector (in practical terms, the coeff vector spat out by summary()) is constrained to be all 0s --all lese stays the same. I could calculate it by hand, but I was wondering if there is a way of doing it with resid() -- resid(my.coxph.mod, type = 'schoenfeld') works wery well for the true Schoenfeld residuals, but I haven't figured out how to use it constraining the beta hat vector to be all 0s. BW F -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com
---- begin included message --- I have a coxph model like coxph(Surv(start, stop, censor) ~ x + y, mydata) I would like to calculate the Schoenfeld residuals for the null, i.e the same model where the beta hat vector (in practical terms, the coeff vector spat out by summary()) is constrained to be all 0s --all lese stays the same. ----- end inclusion --- You can get the fit for any coefficient you want by setting the initial values and asking for 0 iterations. fit0 <- coxph(Surv(start, stop, censor) ~ x + y, mydata, init=c(0,0), iter=0) resid(fit0, type='schoenfeld') Terry Therneau