Florin Vaida writes:
> The baseline hazard is returned by coxph.detail(fit)
Most people would use the survfit() routine instead; it's lots faster
for one thing, and its much easier to plot the results. But coxph.detail
can be used.
> When fitting the model with an offset in
> the linear term, the hazard is not what I'd expect.
The returned baseline hazard is for a fictional subject with covariate
vector = mean(covariates), and an offset value of 0. So moving the variable
z2 in your example from a covariate to an offset term gives the baseline hazard
for a different psuedo-subject. In this simple case, they would differ by
a factor of exp( mean(z2) * coefficient of z2).
Soapbox: "THE" baseline hazard in a Cox model is a rather meaningless
quantity. Computation of the baseline hazard for a particular fictional
subject does make sense, for instance:
fit <- coxph(Surv(time, status==2) ~ age + log(bili) + edema, pbc)
curve <- survfit(fit, newdata=data.frame(age=56, bili=2.3, edema=0))
In this case edema is a discrete variable and the default curve based on the
mean value of .1005 is, shall we say, "difficult to interpret". It's sort of
like finding that average American family with 2.3 children. Use of the newdata
argument gives a curve for a subject that could or perhaps does exist.
(The pbc data set may be found on statlib).
Terry Therneau
Terry M. Therneau, Ph.D. (507) 284-3694
Head, Section of Biostatistics (507) 284-9542 FAX
Mayo Clinic therneau.terry@mayo.edu
Rochester, Minn 55905
-----------------------------------------------------------------------
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
|