Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Main effect for time-varying covariate


From   Nicole Boyle <[email protected]>
To   [email protected]
Subject   Re: st: Main effect for time-varying covariate
Date   Mon, 2 Sep 2013 13:47:02 -0700

Thanks for your input.

It's my understanding that Fine and Gray's motivation [1] behind their
proportional hazards model for the subdistribution of a competing risk
(the basis of -stcrreg-) was to establish a method to analyze
competing risks data _without_ the interpretative issues and
assumption leaps inherent to cause-specific hazard functions. In
addition, the Fine and Gray model estimates the CIF from the
cumulative subhazard function, which is further derived from the
subdistribution hazard and NOT from the cause-specific hazard. As
such, I'm not sure what to make of your comment, "The sub-distribution
hazards... exist solely to study impacts of covariates on
cause-specific cumulative incidence functions (CIFs) and, in
themselves, are of limited interest," since this directly contradicts
my understanding of the subdistribution hazard estimates. Would you be
able to clarify?

Additionally, your second concern (if I understand it correctly) was
regarding modeling time-varying covariates (TVCs) in the -stcrreg-
environment, and you suggested that the lack of discussion of binary
TVCs in the -stcrreg- section of the Stata manual is indicative of
Stata's lack of endorsement for such TVC modeling. In case you weren't
aware, Phil recently posted to this thread [2] and kindly pointed out
a subsection within Stata manual's section about -stcrreg-, where the
modeling of categorical TVCs in the Fine and Gray model are, in fact,
discussed. I have since responded to Phil's reply [3]. So in short, I
respectfully disagree with your statement: I believe that there do
exist correct methods for modeling categorical TVCs (at least via
multiple records per subject, as Adam recently pointed out [4]) within
the context of -stcrreg-, so long as certain assumptions are met. Any
thoughts?

-Nicole


[1] Fine, J. P., & Gray, R. J. (1999). A Proportional Hazards Model
for the Subdistribution of a Competing Risk. American Statistical
Association, 94(446), 496–509. Retrieved from
http://www.jstor.org/stable/2670170

[2] http://www.stata.com/statalist/archive/2013-08/msg01449.html

[3] http://www.stata.com/statalist/archive/2013-08/msg01462.html

[4] http://www.stata.com/statalist/archive/2013-08/msg01319.html




On Mon, Sep 2, 2013 at 10:46 AM, Steve Samuels <[email protected]> wrote:
> Nichole:
>
> I overlooked one part of your original question: "In other words, I'd
> like assess the hazard ratio (at any instantaneous time during
> observation) for the outcome event comparing those with the risk factor"
>
> The sub-distribution hazards and hazard ratios from -stcrreg- are not a
> good choice for this aim. They exist solely to study impacts of
> covariates on cause-specific cumulative incidence functions (CIFs) and,
> in themselves, are of limited interest. If you are interested in
> cause-specific hazards, then follow the advice in the Manual entry for
> -stcrreg-:
>
> "When you have covariates, you can use stcox to perform regression on
> h1(t) by treating failures of type 2 as censored, on h2(t) by treating
> failures of type 1 as censored, or on h1(t) and h2(t) simultaneously by
> using the method of data duplication described by Lunn and McNeil (1995)
> and Cleves (1999). Because cause-specific hazards are identified by the
> data, all three of the above analyses are suitable for estimating how
> covariates affect the mechanism behind a given type of failure."
>
> In -stcox- and -stcrreg-, predicted survival curves or CIFs make make
> sense only for covariates which are fixed at baseline or for time-varying
> covariates that are mathematical functions of baseline covariates. This
> is the only type illustrated in the manual for -stcrreg-. Your 0-1
> covariate Z is not of this type.
>
> If it is significant in -stcrreg-, you can plot the CIFs for someone who has
> value Z = 0 throughout, or Z = 1, throughout If you then fit Z in
> -stcox-, you can plot the smoothed hazard functions assuming Z = 0 or Z
> = 1 throughout.
>
>
>
> Steve
>
> On Aug 30, 2013, at 2:23 PM, Nicole Boyle wrote:
>
> Thanks for the helpful response! It seems I have falsely
> gained the impression that "stsplit" is functionally
> equivalent to, but just more labor-intensive than, using
> the "tvc" option. Per your advice, I'm going to try out
> stsplit; it certainly seems to be the more intuitive route.
>
> Thanks very much!
> Nicole
>
>
> Steve:
> I appreciate the caution you exercised when addressing my
> question. I see that your intention was to avoid giving out
> poor/misleading advice, so I thank you for voluntarily taking
> your personal time to do so. I apologize for my unintended
> lack of clarity when attempting to answer your inquiries.
>
> Concerning your responses, thank you for being so thorough!
> Although I'm admittedly far from fluent in stats (e.g. I'm lost
> on #5, even with your explanation and corrections), you've
> been very helpful in elucidating this whole "tvc" situation.
>
> Thanks so much!
> Nicole
>
>
> _Sidenote:_
> Just for the record, unlike stcox, stcrreg doesn't allow for the
> plotting of Schoenfeld residuals, just "Schoenfeld-like residuals,"
> which (IMHO) are cumbersome to generate and feel like an
> unintended workaround.
> http://www.stata.com/statalist/archive/2010-10/msg00756.html
> Nor will stcrreg allow for testing the non-zero slope (rho) of those
> residuals, as Adam has also previously discussed:
> http://www.stata.com/statalist/archive/2013-08/msg00181.html
> It's a bummer. This is an issue in Stata 12. I'm hoping
> Stata 13 has these PH testing options to available for stcrreg,
> but it doesn't appear so (according to those new features listed
> on stata.com/stata13).
>
>
> On Thu, Aug 29, 2013 at 12:03 PM, Steve Samuels <[email protected]> wrote:
>> "The HR exp((b1 + b2*exp(-0.35*_t)) compares hazards for (x0+1) and x0"
>> should be:
>> The HR exp((b1 + b2*exp(-0.35*_t)) compares hazards for (x(t)+1) and x(t).
>>
>>
>> The second sentence should be: "I consider it professionally irresponsible
>> to answer a question if I'm unsure that a poster has accurately characterized
>> the substantive problem."
>> S.
>>
>>
>> Nicole, Statalist is not a help line in which responders are obligated to
>> answer questions, as asked. I consider it professionally irresponsible
>> to answer a question if I'm that a poster has accurately characterized
>> the substantive problem. Your initial question showed some uncertainty,
>> so I asked you to "describe what it [your covariate] is and how its
>> values are determined." You didn't do this, so I asked again.
>>
>>
>> As you've observed, the tvc() option is confusing. In particular, it is
>> not used only for testing the PH assumption. So let's review the
>> possibilities,
>>
>> 1. Your covariate "z", say, assumed 0-1, is time-varying. If z appears
>> only in the main variable list for -stcrreg- (or -stcox-), you are
>> making the PH assumption, and the estimated hazard ratio exp(b)
>> describes the relative hazard of occurrence for someone with Z, compared
>> to someone without z.
>>
>> 2. You say you are not interested in assessing the PH assumption, but
>> how can you know that it's true?. You check it as follows:
>>
>> a) Include the covariate in the tvc() list, which by default enters the
>> covariate into an interaction with _t. However the default assumes that
>> the HR increases or decreases with time and will miss non-linear
>> interactions (e.g. the HR rises, then falls).
>>
>> b) The preferred approach is to first plot the Schoenfeld residuals
>> against time. (Grambsch, Patricia M, and Terry M Therneau. 1994.
>> Proportional hazards tests and diagnostics based on weighted residuals.
>> Biometrika 81, no. 3: 515-526.). These plots will suggest the form of
>> the expression to use in the texp() option.
>>
>> 3. In 2a, the covariate appears in both the main and tvc() lists. But it
>> is possible to fit a PH model with a time-varying covariate that is
>> entered *only* in the tvc() list. This can occur if the effect of
>> covariate is proportional to a known function of time. The example on p.
>> 137 of the Survival manual shows a decay function:
>>
>> . stcox age, tvc(drug1 drug2) texp(exp(-0.35*_t))
>>
>> Here the effects of the drug "wear off".
>>
>> 4. To elaborate on this example, suppose that a continuous "exposure" x0
>> is measured at time 0, but is subject to the same decay function. as
>> above. Thus x(t) = x0*exp(-0.35*t)
>>
>> You can tell Stata about this in two ways:
>>
>> a. Create the split data set with the value for x from the equation above.
>> Then put x into the main predictor list:
>>
>> . stcox x
>>
>> (I show -stcox-, since I don't know what your -stcrreg- command looks
>> like.)
>>
>> b. Enter x0 into the tvc() list:
>>
>> . stcox , tvc(x0) texp(exp(-0.35*_t))
>>
>> In both cases, x(t) = x0*exp(-0.35*t) and the hazard ratio compares the
>> hazards for (x(t)+1) and x(t). The HR is still constant at all values of
>> t.
>>
>> 5. It is also possible to allow for a differential effect of x at
>> baseline, still keeping the PH assumption.
>>
>> . stcox x0, tvc(x0) exp(-0.35*_t)
>>
>> Here the equation for the log hazard function is:
>>
>> log(h(t|x0) = log(h(t) + x0*(b1 + b2*exp(-0.35*_t))
>>
>> The HR exp((b1 + b2*exp(-0.35*_t)) compares hazards for (x0+1) and x0
>>
>> 6. Finally, one can prepare the data as in 2a, but then check the PH
>> assumption with the tvc() statement and residual plots.
>>
>> . stcox x, tvc(x)
>>
>> Steve
>>
>>
>>
>>
>> On Aug 28, 2013, at 5:36 PM, Nicole Boyle wrote:
>>
>> Forgive me, but I don't understand how discussing these nuances is relevant
>> when addressing the original inquiry: determining the theoretical utility and
>> interpretation of a time-varying covariate whose time-invariant component has
>> been excluded from the model. These concerns seem more in line with a
>> discussion about lead/length time bias.
>>
>> Nevertheless, to assuage your concerns, these patients are continually
>> monitored for the presence of this particular risk factor, regardless
>> of exhibited symptoms.
>>
>> ________________________________________
>> From: [email protected]
>> [[email protected]] on behalf of Steve Samuels
>> [[email protected]]
>> Sent: Wednesday, August 28, 2013 1:34 PM
>> To: [email protected]
>> Subject: Re: st: Main effect for time-varying covariate
>>
>> Nichole:
>>
>> Please explain what the risk factor is and how its activation depends
>> on the medical records. Perhaps you mean that the presence of the risk
>> factor is known only after some test, and that test is recorded in the
>> records. If so, the fact that the test is made at time "t" doesn't
>> preclude the presence of the factor before "t". Also, if the test was
>> made in response to certain symptoms, then other issues arise.
>>
>> Steve
>>
>>
>> On Aug 27, 2013, at 5:00 PM, Boyle, Nicole M wrote:
>>
>> Hi Steve,
>>
>> Thanks for your response! I've elaborated on the issue in more
>> (perhaps excessive) detail:
>>
>>
>> ***Variable details***
>> I'd like to model a binary variable as time-varying. This binary
>> variable will model the onset of a particular
>> risk factor. All patients under study enter into the study with this
>> risk factor "turned off." The timing of
>> when this risk factor "turns on" depends entirely on each patient's
>> medical records (and for some patients,
>> this risk factor may never "turn on"). This risk factor can only go
>> from "off" to "on"; the reverse ("on" to "off")
>> is not possible.
>>
>>
>> ***Reason for modeling this var as time-varying***
>> I would like to model this particular risk factor as a time-varying
>> covariate in order to assess its association
>> with the outcome while avoiding possible immortal time bias. In other
>> words, I'd like assess the hazard ratio
>> (at any instantaneous time during observation) for the outcome event
>> comparing those with the risk factor
>> "turned on" vs. those with the risk factor "turned off", accounting
>> for the possibility that a patient's risk factor
>> may be "turned on" at any time before or after his/her outcome event.
>>
>>
>> ***Stata's covariate vs. coefficient distinction***
>> Right now, the closest I can find to an answer is a mention in the
>> Stata Statistical Analysis Manual:
>>
>>      http://www.stata.com/manuals13/ststcox.pdf#ststcoxRemarksandexamples
>>
>> In said manual, Cox models are run with and without the time-invariant
>> component (on page 12 and pages
>> 13-14, respectively). The Stata manual differentiates between models
>> fit with time-varying COVARIATES
>> (without the time-invariant component) from models fit with
>> time-varying COEFFICIENTS (with the time-invariant
>> component), saying
>>
>>    "Above we used tvc() and texp() to demonstrate fitting models
>> with time-varying covariates, but
>>     these options can also be used to fit models with time-varying
>> coefficients."
>>
>> I think this aforementioned covariate/coefficient distinction may be
>> the source of my confusion. From the
>> manual's suggestion, it seems like adding this time-invariant
>> component (aka: "main effect") will only test
>> the proportional hazards assumption of the coefficient.
>>
>>
>> Thanks,
>> Nicole
>> ________________________________________
>> From: [email protected]
>> [[email protected]] on behalf of Steve Samuels
>> [[email protected]]
>> Sent: Wednesday, August 21, 2013 2:13 PM
>> To: [email protected]
>> Subject: Re: st: Main effect for time-varying covariate
>>
>> I'd need to know details about the internal covariate before I can
>> answer your question. So please describe what it is and how its values
>> are determined.
>>
>> Steve
>>
>> On Aug 20, 2013, at 7:14 PM, Boyle, Nicole M wrote:
>>
>> Hi all,
>>
>> I'm modeling a multivariable competing risks regression model
>> (stcrreg), and I want to include an internal
>> time-varying covariate.
>>
>> (1) Should I include a main effect for this time-varying covariate in
>> the model? (I'm not trying to test
>> the proportionality assumption here)
>>
>> (2) How does one report the overall value and significance of this
>> time-varying variable?
>>
>> Thanks,
>> Nicole
>>
>> (my apologies if this is a duplicate... 1st email bounced)
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index