s-news
[Top] [All Lists]

Re: baseline hazard in Splus

To: Terry Therneau <therneau@mayo.edu>
Subject: Re: baseline hazard in Splus
From: Eric Wajnberg <wajnberg@sophia.inra.fr>
Date: Tue, 18 Mar 2008 12:06:36 +0100
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <200803171650.m2HGou207175@hsrnfs-101.mayo.edu>
References: <200803171650.m2HGou207175@hsrnfs-101.mayo.edu>
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)
Ok, thanks for this reply (and thanks to Matt Austin who also helps).

Now I see. My misunderstanding is that I was sure that the coxph.detail()$hazard was the **baseline** hazard (i.e., with all covariates equal to zero). Actually, it rather is the hazard for a cohort of individuals having the covariates set the their average values. This is different and this was misleading (at least for me).

Thanks in all cases for clarifying this to me.

Eric.


Terry Therneau wrote:
 The question was why coxph.detail(fit) and survfit(fit) give different answers 
for a fitted Cox model.  The answer is that they do give the same answers for 
me.
 

  
fit <- coxph(Surv(time, status) ~ ph.ecog + wt.loss, lung)
    

  
dt <- coxph.detail(fit)
sfit <- survfit(fit)
    

  
h1 <- cumsum(dt$hazard)
h2 <- -log(sfit$surv)
    

  
all.equal(h1, h2)
    
  T  
  
fit$mean
    
[1] 0.9342723 9.7276995

  Now, my guess as to what may have gone wrong for you: the coxph.detail 
function returns the baseline hazard for a fiction subject with covariates = 
mean of the data set.  It has no other option.
  The survfit function, however, will give the baseline hazard for an arbitrary 
setting of the covariates, for instance
  	survfit(fit, newdata=data.frame(ph.ecog=1, wt.loss=20)
to get the survival for a subject with physician's ECOG score of 1 and a 20 lb 
weight loss.  If no values are given it defaults to the mean.

  I think you compared a "mean" patient (rarely a reasonable value) in 
coxph.detail to a more realistic set of covariate values from survfit.  One 
would not expect the same baseline survival.
  
  	Terry Therneau
  	


------------ begin included message ---------------------
Dear all,

There is something I do not understand in fitting a cox regression model 
 in Splus.

Ok, I have a model fitted that way:

fit<-coxph(Surv(start,stop,event)~ "list of covariates")

I know I can collect back the y-coordinates of the cumulative baseline 
hazard function that way:

cumsum(coxph.detail(fit)$hazard)

(and I can collect back the corresponding x-coordinates with: 
coxph.detail(fit)$time)

What I do not understand is that we should also be able to collect this 
through an estimate of the baseline survivor function, S0(t). This 
function can be estimated that way:

S0t<-survfit(fit,list("here a list of values for the covariates 
corresponding to the baseline hazard"))$surv

Then, since by definition H(t)=-log(S(t)), I was sure that

-log(S0t) should exactly correspond the cumulative baseline hazard 
function, but this is not the case.

Can someone explain me where I'm wrong?

Thanks in advance for that.

Eric.

-

  

-- 

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    Eric Wajnberg
    Chair of the ESF Scientific programme on
    Behavioural Ecology of Insect Parasitoids
    Associated Professor at the UQAM
    (Universite du Quebec a Montréal)
    I.N.R.A.
    400 Route des Chappes, BP 167,
    06903 Sophia Antipolis Cedex, France
    Tel: (33-0) 4.92.38.64.47
    Fax: (33-0) 4.92.38.65.57
    e-mail: wajnberg@sophia.inra.fr
    Web page: http://www.sophia.inra.fr/perso/wajnberg/

    Editor-in-Chief of BioControl, Published by Springer.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<Prev in Thread] Current Thread [Next in Thread>