s-news
[Top] [All Lists]

[S] coxph()

To: s-news@wubios.wustl.edu
Subject: [S] coxph()
From: Florin Vaida <vaida@sdac.harvard.edu>
Date: Tue, 19 Sep 2000 17:51:55 -0400 (EDT)
Cc: "Ronghui (Lily) Xu" <rxu@hsph.harvard.edu>
Sender: owner-s-news@wubios.wustl.edu
Dear S-newsers,

I have a problem for coxph() buffs.

The baseline hazard is returned by coxph.detail(fit),
where fit is a coxph() object. When fitting the model with an offset in
the linear term, the hazard is not what I'd expect. Consider the example
below where the offset was chosen based on the fit of the model without
offset.  The other parameter estimates are the same in the two models,
but the hazards differ by a constant factor.  Any explanations?

Thanks,

        Florin



x <- sort(c(22,3078,89,183,1255, 2673,226,369,
        565,481))       #  survival times (sorted)
delta <- rep(1,10)      #  no censoring
z1 <- rep(c(1,0),5)     #  z1,z2 = covariates
z2 <- c(1:5,1:5)
fit <- coxph(Surv(x,delta) ~ z1 + z2)   # model without offsets

offst <- z2* fit$coef[2]        # pick offset based on "fit"
fito <- coxph(Surv(x,delta) ~ z1 + offset(offst) )
        # should yield same parameters as "fit"

cbind(x,coxph.detail(fit)$haz,coxph.detail(fit)$haz)
        # hazard functions differ by a factor of exp(0.2228)











============================
Florin Vaida
Assist Prof, Dept of Biostatistics
Harvard School of Public Health 
655 Huntington Ave Boston MA 02115
Tel (617) 432-2914

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • [S] coxph(), Florin Vaida <=