Hello! my dear STATA users!


I have run a cox regression model dealing with time-varying covariates.
I need to combine

texp(ln(_t))
texp(_t >= ) when I use tvc option.

My bottom line is I want to analyze certain period of time given ln time t
: Analyze when time t > 5 given ln(t)

I try to combine as below in the first place, however, two commends give me the same coefficient.
I guess those are the equivalent commend because the second one is to take natural log on both sides in texp ???

1. stcox regudummy_new regu_brand tvc(time dependent variables) texp(_t>5)

2. stcox regudummy_new regu_brand tvc((time dependent variables) texp(ln(_t)>ln(5))


If I try

3. stcox regudummy_new regu_brand tvc((time dependent variables) texp(ln(_t)>5),

tvc gets omitted.


Is there any code for my situation?
I have looked through all the references during a month, ended up finding none.

Many thanks for any help!!!♥


For the reference,
https://www.stata.com/manuals13/ststsplit.pdf
According to the technical note it says,

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If our interest really were just in performing this test of the proportional-hazards assumption, we would not have had to use stsplit at all.

We could have just typed . stcox age treat, tvc(age) to have fit a model including t*age, and if we wanted instead to include ln(t)*age or age*t ≥ 500, we could have typed .

stcox age treat, tvc(age) texp(ln(_t)) .
cstoc age treat, tvc(age) texp(_t >= 500)

Still, it is worth understanding how stsplit could be used to obtain the same results for instances when stcox’s tvc() and texp() options are not rich enough to handle the desired specification.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------