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: stcrreg: graphing the interaction with time


From   Phil Clayton <[email protected]>
To   [email protected]
Subject   Re: st: stcrreg: graphing the interaction with time
Date   Wed, 20 Oct 2010 09:05:06 +1100

I would normally do the following steps:

1. Run the main model:
stcrreg myvar ..., compete(...)

2. Add a TVC term using log(_t):
stcrreg myvar..., compete(...) tvc(myvar) texp(log(_t))

Note that myvar is in there twice, once as a constant effect and once as a TVC. If the TVC term is significant it indicates that the subhazard varies with time. If the SHR is >1 the effect increases over time; if the SHR is <1 the effect decreases with time.

3. Go back to the main model & generate Schoenfeld-like residuals:
stcrreg myvar ..., compete(...)
predict double res_*, schoenfeld
twoway (scatter res_1 _t) (lowess res_1 _t, mean), title("Schoenfeld-like residuals - myvar")

4. If you need further information on the shape of the interaction, piecewise regression is probably the next step

Phil

On 20/10/2010, at 2:35 AM, Eduardo Nunez wrote:

> Dear Statalisters:
> 
> After running stcrreg to my data, I found that my exposure variable
> interacted with time (using tvc) with a p-value 0.001.
> How should I graph such interaction in order to see its direction and
> shape? I used the default in stcrreg, meaning interacting with _t.
> My exposure variable is continuous.
> 
> I used Stata 11.1
> 
> Thank you in advance,
> 
> Eduardo
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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