[R] Schoenfeld residuals for a null model coxph

Federico Calboli f.calboli at imperial.ac.uk
Thu Feb 23 11:43:45 CET 2012


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.



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

More information about the R-help mailing list