I've collapsed my dataset via the collapse (means) option into two groups based on whether a dummy variable is 0 or 1. I've also created a difference variable Diff between the two means. I tried plotting the two means in a graph and it went well but due both of them being very close to each other the distance between them is nearly invisible. A large drop in one of the quarters also makes the Y-axis stretched making the difference even less visible.
What I am trying to do then is to plot this difference over time to see whether the difference has increased from the first period or decreased over the following periods and whether this increase/decrease remains zero with 95% confidence (that is the original difference between means over the period has not statistically differed from zero).
Here is a sample of my data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double(Lowcap0 Lowcap1) float(Quarter Diff) -.0037198 -.004552 233 .0008322 -.0052748 -.0050738 234 -.000201 .0568899 .0532897 235 .0036002 -.002273 -.0060779 236 .0038049 .0597479 .0575683 237 .0021796 .0538835 .0507662 238 .0031173 .0497061 .0452972 239 .0044089 -.0367175 -.0274895 240 -.009228 -.2862794 -.2742874 241 -.011992 -.0271649 -.0317676 242 .0046027 -.0198085 -.0292484 243 .0094399 -.0173205 -.0161284 244 -.0011921 -.0166656 -.0166235 245 -.0000421 end format %tq Quarter
Array Array
If anyone could suggest how to get that second plot to check whether the change in difference between means remains statistically indifferent from zero I would be extremely grateful. I've tried looking through Statalist and cannot figure it out.
Thank you in advance!
0 Response to Means and their difference confidence interval
Post a Comment