Dear Statalist users,
I am working with event history data with multiple episodes/recurrent events per individual. My main models are Cox models using stcox. The data are already stset, and I account for multiple episodes per person using clustered standard errors.
My substantive setup is:
- independent variable: binary
- mediator: continuous
- outcome: event occurrence / survival time
- data structure: multiple episodes/recurrent events per individual
My main Cox model is approximately:
stcox X M controls, vce(cluster id)
I would like to estimate a mediation effect of X through M on the event outcome.
I have considered three options:
1. A pragmatic Cox approach:
reg M X controls, vce(cluster id)
stcox X controls, vce(cluster id)
stcox X M controls, vce(cluster id)
2. A discrete-time event history approximation using logit and KHB:
khb logit _d X tgroup controls || M, vce(cluster id)
3. Survival mediation commands such as paramed or med4way. However, paramed does not seem to support yreg(cox) in my Stata installation, and I am unsure whether med4way is appropriate for recurrent events/multiple episodes.
My questions are:
1. Is the discrete-time logit/KHB approach a defensible mediation analysis when the main models are Cox models?
2. How problematic is it to use KHB on a discrete-time version of the data while reporting Cox models as the main event-history models?
3. Is there a recommended Stata approach for mediation analysis with Cox models and recurrent events?
4. Would med4way be appropriate in this setting, or is it mainly suitable for single-event survival outcomes?
Any guidance or references would be greatly appreciated.
Best,
Julia
I am working with event history data with multiple episodes/recurrent events per individual. My main models are Cox models using stcox. The data are already stset, and I account for multiple episodes per person using clustered standard errors.
My substantive setup is:
- independent variable: binary
- mediator: continuous
- outcome: event occurrence / survival time
- data structure: multiple episodes/recurrent events per individual
My main Cox model is approximately:
stcox X M controls, vce(cluster id)
I would like to estimate a mediation effect of X through M on the event outcome.
I have considered three options:
1. A pragmatic Cox approach:
reg M X controls, vce(cluster id)
stcox X controls, vce(cluster id)
stcox X M controls, vce(cluster id)
2. A discrete-time event history approximation using logit and KHB:
khb logit _d X tgroup controls || M, vce(cluster id)
3. Survival mediation commands such as paramed or med4way. However, paramed does not seem to support yreg(cox) in my Stata installation, and I am unsure whether med4way is appropriate for recurrent events/multiple episodes.
My questions are:
1. Is the discrete-time logit/KHB approach a defensible mediation analysis when the main models are Cox models?
2. How problematic is it to use KHB on a discrete-time version of the data while reporting Cox models as the main event-history models?
3. Is there a recommended Stata approach for mediation analysis with Cox models and recurrent events?
4. Would med4way be appropriate in this setting, or is it mainly suitable for single-event survival outcomes?
Any guidance or references would be greatly appreciated.
Best,
Julia
