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   Phil Clayton <[email protected]>
To   [email protected]
Subject   Re: st: Main effect for time-varying covariate
Date   Tue, 3 Sep 2013 21:22:35 +1000

Nicole,

I probably wouldn't describe the Fine-Gray model as "protecting" anything. It models the cumulative incidence function in the presence of competing risks, whereas a Cox model models the cause-specific hazard (ie what would happen if the competing event didn't occur).

I went to a talk by Jason Fine last year and he gave the following general advice:
- use a Cox model for each of the competing outcomes (in your case infection & death)
- use a Fine-Gray model for each of the competing outcomes
- present all of those results

I must say, in my experience the Cox and Fine-Gray models (without time-varying covariates) give very similar results most of the time.

Your binary time-varying covariate is a problem unless you can assume that it wouldn't have changed in people who died. It doesn't sound like that's a very reasonable assumption in your dataset, but you would know better than us.

Therefore I think if it were me I'd follow Steve's advice and model the cause-specific hazard using -stcox-

You could also try a conditional landmark analysis (see the paper that Adam pointed you to, Giobbie-Hurder et al, J. Clin. Oncol. 2013 Aug 10;31(23):2963–9). For example, if most infections and death are occurring after 3 months, but most rejections are occurring before 3 months, you could start your analysis time at 3 months and model the competing events using rejection status at 3 months as your baseline covariate. This would allow you to use -stcrreg- without introducing the TVC bias.

Phil

On 01/09/2013, at 9:51 AM, Nicole Boyle <[email protected]> wrote:

> (Just to briefly mention, I meant to address the beginning of my
> last response to Adam, but it seems that magic [?] deleted
> that portion of my response once posted. Thanks again, Adam.)
> 
> 
> Phil:
> Thanks for crphplot! I'm going to fiddle with it this weekend.
> 
> I'm reading the "Multiple records per subject" section you've recommended,
> and I'm very glad you've advised this. According to the section, it seems like
> competing risks STILL have the opportunity to bias the study, even within
> the context of a competing risks regression, if the inherent assumption of
> stcrreg (the value of a subject's time-varying covariate at time of failure via
> competing risk remains fixed after this failure) is an invalid assumption.
> 
> Therefore, with the Fine and Gray model, modeling a categorical variable
> as time-varying PRECLUDES that same variable from being protected by
> the model's inherent competing risks environment. Is this accurate?
> 
> In other words, take my study of post-transplant patients:
>    * Event of interest = post-transplant infection
>    * Time-varying factor = onset of an irreversible post-transplant
> complication
>    * Competing risk = death
> 
> With regards to these parameters, the Fine and Gray model does account
> for the competition of death vs. infection, but does NOT account for
> the possible
> competition of death vs. post-transplant complication.
> 
> POTENTIAL PROBLEM?:
> Looking at my data now, about 50% of those subjects who "exit" observation
> via competing risk (death) also had the post-transplant complication.
> _If_ my understanding of the issue described in the manual excerpt is correct,
> then I need to make sure that the other 50% of those subjects who died prior
> to having this post-transplant complication would NOT have had this complication
> if alive and given the opportunity.
> 
> QUESTIONS:
> (1) Does my understanding of the issue check out? And if so...
> (2) Any possible remedies, or is this simply a model assumption that
> must be noted?
> (3) Does this issue also apply to cause-specific hazards (stcompet)?
>     stcompet literature:
> http://www.stata-journal.com/sjpdf.html?articlenum=st0059
> 
> Thank you so much!
> Nicole
> 
> On Fri, Aug 30, 2013 at 8:25 PM, Phil Clayton
> <[email protected]> wrote:
>> Here's an example. No doubt it could be improved. Much of the code is borrowed from stphtest.ado.
>> 
>> Phil
>> 
>> -------- program crphplot --------
>> program define crphplot, rclass
>>        version 11
>>        syntax varname(fv), *
>> 
>>        capture assert e(cmd)=="stcrreg"
>>        if _rc {
>>                di as error "crphplot can only be used after stcrreg"
>>                error 498
>>        }
>> 
>>        * convert factor variable notation
>>        _ms_extract_varlist `varlist'
>>        local varlist "`r(varlist)'"
>> 
>>        * calculate schoenfeld-like residuals
>>        tempname b
>>        mat `b' = e(b)
>>        local dim = colsof(`b')
>>        forval i = 1/`dim' {
>>                tempvar sch`i'
>>                local schvars `schvars' `sch`i''
>>        }
>>        qui predict double `schvars' if e(sample), schoenfeld
>>        local n : word count `schvars'
>> 
>>        * subtitle will use variable label if it exists
>>        local varlab: variable label `varlist'
>>        if "`varlab'"!="" local subtitle subtitle("`varlab'")
>> 
>>        * lowess plot of the relevant variable vs time
>>        forvalues i=1/`n' {
>>                local lbl: variable label `sch`i''
>>                local lbl=substr("`lbl'", 23, .)
>>                if "`lbl'"=="`varlist'" ///
>>                        lowess `sch`i'' _t, mean noweight ///
>>                        title("Test of proportional subhazards assumption") ///
>>                        xtitle(Time) `subtitle' `options'
>>        }
>> end
>> -------- end program --------
>> 
>> -------- example analysis --------
>> webuse hypoxia, clear
>> stset dftime, failure(failtype==1)
>> stcrreg ifp tumsize pelnode, compete(failtype==2)
>> crphplot ifp
>> -------- end example --------
>> 
>> 
>> On 31/08/2013, at 11:30 AM, Phil Clayton <[email protected]> wrote:
>> 
>>> It wouldn't be hard to program a wrapper for generating and plotting the Schoenfeld-like residuals. That's essentially what -estat phtest, plot()- does (take a look at -viewsource stphtest.ado-)
>> 
>> 
>> *
>> *   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