hi sorry if this has been discussed before, but I'm wondering why the scaled Schoenfeld residuals do not follow the defining formula for obtaining them from the ordinary Schoenfeld residuals, but are instead offset by the estimated parameter values. e.g. library(survival) attach(ovarian) sv<-Surv(futime,fustat) f1<-coxph(sv~age+ecog.ps) f1 schres<-resid(f1,type="schoenfeld") schresc<-resid(f1,type="scaledsch") n=sum(fustat) V<-f1$var schresc1<-t(n*V%*%t(schres)) #schresc1 is how the scaled Schoenfeld residuals are defined #in terms of the number of events #variance of the parameter estimates, #and ordinary Schoenfeld residuals #but schresc1 and schresc differ schresc schresc1 #schresc is schresc1 offset by the parameter estimates beta<-as.vector(f1$coef) nbeta<-outer(rep(1,n),beta) nbeta schresc-nbeta schresc1 #is there a reason for the offset #or am I missing something? thanks Greg Greg Dropkin gregd at gn.apc.org
On Wed, 23 Sep 2009, Greg Dropkin wrote:> hi > > sorry if this has been discussed before, but I'm wondering why the scaled > Schoenfeld residuals do not follow the defining formula for obtaining them > from the ordinary Schoenfeld residuals, but are instead offset by the > estimated parameter values. >Because their purpose in life is to be smoothed against time to get an estimate of the parameter as a function of time (plot.cox.zph). -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle
hi thanks, I see that cox.zph is plotting and smoothing the "scaled Schoenfeld" residuals as generated by R, but since the term is already in the literature with a formula, maybe the help should clarify the offset. I found it confusing anyway. thanks for help greg Thomas Lumley tlumley at u.washington.edu Thu Sep 24 16:18:17 CEST 2009 Previous message: [R] scaled Schoenfeld residuals Next message: [R] generate random number without repetition Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] -------------------------------------------------------------------------------- On Wed, 23 Sep 2009, Greg Dropkin wrote:> hi > > sorry if this has been discussed before, but I'm wondering why the scaled > Schoenfeld residuals do not follow the defining formula for obtaining them > from the ordinary Schoenfeld residuals, but are instead offset by the > estimated parameter values. >Because their purpose in life is to be smoothed against time to get an estimate of the parameter as a function of time (plot.cox.zph). -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle