Dear all,
I just fit a Cox model with the Efron approximation for tied data with interactions of specific covariates and survival time to account for violations of the proportional hazards assumption. To do so, I first used stcox with the efron option and inserted the interactions with linear survival time "by hand".
As I expected, this yielded results similar to those obtained earlier from a cloglog-discrete time model.
However, on the way I realized that stcox has built-in options to include interactions with survival time, i.e. tvc( varlist ) and tvexp( exp ).
When using these options instead of interacting survival time by hand the results are very different both from cloglog but more surprisingly from stcox with interactions inserted manually.
I read the manual of stcox and the tvc-option and as I understood stata justs inserts interactions with time - just as I did. But apparently this is not what is going on.
So, why are the results so very different when using tvc() instead of manually adding interactions with time to the model?
What am I doing wrong when inserting the interactions by hand?
Here is the code I used:
And heres the output:
Interactions with survival time added by hand:
Time interactions using tvc-option:
I just fit a Cox model with the Efron approximation for tied data with interactions of specific covariates and survival time to account for violations of the proportional hazards assumption. To do so, I first used stcox with the efron option and inserted the interactions with linear survival time "by hand".
As I expected, this yielded results similar to those obtained earlier from a cloglog-discrete time model.
However, on the way I realized that stcox has built-in options to include interactions with survival time, i.e. tvc( varlist ) and tvexp( exp ).
When using these options instead of interacting survival time by hand the results are very different both from cloglog but more surprisingly from stcox with interactions inserted manually.
I read the manual of stcox and the tvc-option and as I understood stata justs inserts interactions with time - just as I did. But apparently this is not what is going on.
So, why are the results so very different when using tvc() instead of manually adding interactions with time to the model?
What am I doing wrong when inserting the interactions by hand?
Here is the code I used:
Code:
stcox /// ethn_ger /// post96 /// treat /// i.male /// c.immiage /// c.ftexp_bef /// i.noschool /// i.noprof /// c.ueexp_bef /// c.immi_ue_rate /// i.poland i.romania i.ussr /// c._t#1.ethn_ger /// c._t#1.post96 /// c._t#1.treat /// c._t#1.male /// c._t#c.immiage /// c._t#c.ftexp_bef, /// efron r est store coxefron stcox /// ethn_ger /// post96 /// treat /// i.male /// c.immiage /// c.ftexp_bef /// i.noschool /// i.noprof /// c.ueexp_bef /// c.immi_ue_rate /// i.poland i.romania i.ussr, /// efron r tvc(ethn_ger post96 treat male immiage ftexp_bef) texp(_t) est store coxefron2
Interactions with survival time added by hand:
Time interactions using tvc-option:
Comment