Hi,
I have a time series and am interested in fitting a segmented regression model to my data to estimate whether there is a change in trends/slopes before and after the introduction of a new policy
I am basing my analyses on this paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5407170/ so I enter 3 predictor terms in the model: time, ban (called ban and coded as 0 before policy introduction, and 1 after that), and a time*ban interaction. I can't share my data so I am using a sample data example, which reflects what I do on my own data:
clear *
use http://www.stata-press.com/data/r16/wpi1.dta
g time = _n
g ban = time>=101 //policy introduced in 1st quarter 1985
regress wpi c.time##i.ban
My understanding is that the coefficient of time captures the trend pre-policy, while the interaction term (time*ban) captures the change post-policy.
My question is how can I estimate the actual slope post-policy introduction and its standard error?
Thanks for your help!
I have a time series and am interested in fitting a segmented regression model to my data to estimate whether there is a change in trends/slopes before and after the introduction of a new policy
I am basing my analyses on this paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5407170/ so I enter 3 predictor terms in the model: time, ban (called ban and coded as 0 before policy introduction, and 1 after that), and a time*ban interaction. I can't share my data so I am using a sample data example, which reflects what I do on my own data:
clear *
use http://www.stata-press.com/data/r16/wpi1.dta
g time = _n
g ban = time>=101 //policy introduced in 1st quarter 1985
regress wpi c.time##i.ban
My understanding is that the coefficient of time captures the trend pre-policy, while the interaction term (time*ban) captures the change post-policy.
My question is how can I estimate the actual slope post-policy introduction and its standard error?
Thanks for your help!
Comment