I am running regressions of the form:
Here, dependent_t is the dependent variable measured at time t; I am looking at the 720 different times from t = 0 to t = 719. treatment1 and treatment2 are dummy variables. Finally, baseline is a (continuous) control variable.
I was able to run the regressions using a loop:
Each regression gives me two estimated coefficients of interest, namely the coefficients associated with the treatment dummies. I want to plot the estimated coefficients along with their confidence intervals. Alternatively, I want to get these numbers in a table so I can make the plot with some other software.
I have tried various things (e.g. coef plot) but keep running into issues (e.g. STATA doesn’t seem to let me store 720 ‘models’). If it’s useful, I can try to outline all of these issues but that would make this post much longer.
Is there any easy way to do this? Many thanks in advance for any suggestions.
Code:
reg dependent_t treatment1 treatment2 baseline
I was able to run the regressions using a loop:
Code:
forvalues n = 0/719 { reg dependent`n' treatment1 treatment2 baseline }
I have tried various things (e.g. coef plot) but keep running into issues (e.g. STATA doesn’t seem to let me store 720 ‘models’). If it’s useful, I can try to outline all of these issues but that would make this post much longer.
Is there any easy way to do this? Many thanks in advance for any suggestions.
Comment