[R] Problem of COX model with time dependent covariate
Terry Therneau
therneau at mayo.edu
Wed Dec 28 16:50:20 CET 2011
I'll add just a little to what David said.
The normal meaning of a "time dependent covariate" is a covariate that
changes with time. For instance in a model that included x="most recent
available blood pressure" the value of x will change at each patient
visit. You obviously can't get those new values as x=baseline + c*time
unless you are willing to assume a very odd biology for the patient. I
would think the same about glomular filtration rate (GFR).
A different question is a time dependent coefficient. That is, the
variable stays the same but it's effect changes over time. Now in this
case a model that beta(t) = a + bt has some possible merit, but in my
optinion the biology it implies is still quite odd. So I don't find
that model very interesting, even though some packages impliment it. In
R there is a more useful approach:
fit <- coxph(Surv(time, outcome) ~ eGFR.base, ori.data)
zfit <- cox.zph(fit)
plot(zfit)
This produces a smoothing spline estimate of beta(t) with confidence
bands. You can look at the plot and begin to understand the data, not
just create p-values.
Terry T.
On Dec 26, 2011, at 3:02 AM, JiangGZ wrote:
>
> Hi all,
>
>
> I am trying to detect association between a covariate and a disease
> outcome using R. This covariate shows time-varying effect, I add a
> time-covariate interaction item to build Cox model as follows:
> COX <- coxph(as.formula("Surv(TIME,outcome)~eGFR_BASE
> +eGFR_BASE:TIME"),ori.data);
>
>
> coef exp(coef) e(coef) z p
> eGFR_BASE 6.40 603.5133 0.3702 17.3 0
> eGFR_BASE:TIME -3.41 0.0329 0.0772 -44.2 0
>
>
> But the result seems very different from that got by SPSS:
More information about the R-help
mailing list