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
Sat, 31 Aug 2013 16:51:40 -0700
(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/