In the code below, I'm producing both a baseline and a shocked forecast of a variable y (fb_y and f1_y respectively). The variable effect_y is just the difference of these two means. How would I then calculate a confidence interval for effect_y in Stata 18?
Code:
forecast create model1, replace forecast estimates reg1 forecast solve, begin(1) prefix(fb_) simulate(betas, statistic(stddev, prefix(sdb_)) reps(100)) forecast create model1, replace forecast estimates reg1 forecast adjust x1 = x1 + 1 forecast solve, begin(1) prefix(f1_) simulate(betas, statistic(stddev, prefix(sd1_)) reps(100)) gen effect_y = f1_y - fb_y