Hi folks,
I am going to try and present a simplified version of a problem I have encountered in working with a time-to-event dataset to study a natural experiment. I am absolutely new to survival analysis, so hope you have some insights.
A policy change affects half a population. In the period after the policy announcement (Post), the group affected by the policy (Treated) are expected to be more likely to experience an event of interest. But, they are expected to take longer to experience the event. So, my hypothesis is twofold. The Treated in the Post period are:
Question 2: How can I plot these hazard functions while adjusting for covariates in the fashion of a difference-in-difference?
Here is what I think the answer might be using sts graph. I define the binary variables Treatment, and Post to use as covariates, and the interaction TreatmentXPost to use as strata. I think what I should do is this:
Following the explanation here (towards the bottm of the webpage) of what “strata” in sts graph does, I think what I would be plotting are the baseline hazard functions obtained by estimating:
log[ h(t,X) ] = log[h0(t)] + b1*Treatment + b2*Post
log[ h(t,X) ] = log[h1(t)] + b1*Treatment + b2*Post
Where h1 is the baseline hazard for the stratum TreatmentXPost=0, and h2 is the one for TreatmentXPost=1.
Question 3: Would I be plotting the two baseline hazard functions with the values of the covariates held at zero?
Question 4: Are there non-graphical ways to think about the dual hypotheses?
I am using Stata 15.1.
I am going to try and present a simplified version of a problem I have encountered in working with a time-to-event dataset to study a natural experiment. I am absolutely new to survival analysis, so hope you have some insights.
A policy change affects half a population. In the period after the policy announcement (Post), the group affected by the policy (Treated) are expected to be more likely to experience an event of interest. But, they are expected to take longer to experience the event. So, my hypothesis is twofold. The Treated in the Post period are:
- more likely to experience the event
- likely to have a delayed experience of the event
Question 1: Am I correct in understanding that this is a case of non-proportional hazards?
Question 2: How can I plot these hazard functions while adjusting for covariates in the fashion of a difference-in-difference?
Here is what I think the answer might be using sts graph. I define the binary variables Treatment, and Post to use as covariates, and the interaction TreatmentXPost to use as strata. I think what I should do is this:
Code:
sts graph, hazard strata(TreatmentXPost) adjustfor(Treatment Post)
log[ h(t,X) ] = log[h0(t)] + b1*Treatment + b2*Post
log[ h(t,X) ] = log[h1(t)] + b1*Treatment + b2*Post
Where h1 is the baseline hazard for the stratum TreatmentXPost=0, and h2 is the one for TreatmentXPost=1.
Question 3: Would I be plotting the two baseline hazard functions with the values of the covariates held at zero?
Question 4: Are there non-graphical ways to think about the dual hypotheses?
I am using Stata 15.1.
Comment