[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Questions regarding -tvc- and proportional hazards
Joseph Wagner <WagnerJ@edc.pitt.edu> asks about time-varying covariates
in -stcox- and the test of proportional hazards.
> My survival analysis uses date of infection with hep c as the origin and the
> endpoint as date of esld, or last date of follow up. I have dates of HIV
> and ART as well. I set up my data with four observations per person, one
> for hep c date, one for hiv date, one for art date, and one for esld or last
> follow up date. I also have age at hep c infection, (agebase).
> When I analyze that data using -tvc- I have hiv and art do NOT increase the
> risk of esld (I realize I have a power issue):
> stcox agebase, tvc(hiv art) mgale(mg) schoenfeld(sc*) scaledsch(ssc*)
First of all, the -tvc()- option to -stcox- is for use when you want a
covariate to vary with time, but vary in such a way that can be expressed as
(variable in your data) * (some function of time, _t)
By default, "some function" is just the identity function _t, but you can
override that with the -texp()- option. When Joseph specifies
. stcox agebase, tvc(hiv art) mgale(mg) schoenfeld(sc*) scaledsch(ssc*)
he is saying that the log relative hazard (LRH) is
LRH = b_1 * agebase + b_2*hiv*_t + b_3*arg*_t (1)
However, since Joseph already captured the time-varying nature of -hiv- and
-arg- by having split records, specifying them as -tvc()- is not necessary to
tell Stata that these variables are time-varying. In fact, if you simply
. stcox agebase hiv art (2)
then, because you have split records, the time-varying nature of -hiv- and
-arg- is captured. This is a perfectly valid model.
If you examine (1), you can see that it can be used for two purposes: (i) I
have covariates -hiv*_t- and -arg*_t- and I think LRH is time-constant and the
PH assumption is true or (ii) I have covariates -hiv- and -arg- that are
either time-constant or time-varying in a way already captured by split
records, and I think that LRH itself is time-varying and the PH assumption is
violated. (ii) is more in line with Joseph's data, since I can't think of
a good interpretation for a covariate like -hiv*_t-.
Joseph is also interested in testing the proportional hazards assumption.
He proceeds by fitting (1) and the using -stphtest- and finds the test to
be insignificant. However, because he fit (1) he has already stipulated that
the LRH is time-varying in -hiv- and -arg-, and so I am not surprised by this
In order to test proportional hazards, what Joseph should do is either
a. Fit (2), then use -stphtest-. When he does so, he is testing to
see if the LRH is time-varying (not time-constant as PH contends)
in either one, some, or all of -agebase-, -hiv-, and -art-.
. stcox agebase hiv art, tvc(hiv art) ...
and then test the significance of the coefficients in -tvc(hiv art)-
by typing at post-estimation
. test [t]
which tests the coefficients in the time-varying part of the model.
This checks to see if the LRH is time-varying in either of -hiv- or
-art-, or both.
The difference between a. and b. is slight -- a. allows for time variance with
respect to -agebase-, b. doesn't.
* For searches and help try: