Hello,
I am trying to graph 4 lines that have shaded confidence intervals. I have the upper and lower bounds already and the data is formatted like below.
The problem I am having is that the shaded area for 3 of the confidence intervals intersect. When the shaded areas intersect I need them to be transparent/blend.
After searching I found drarea but I could only get it to work for 2 intersecting areas not 3.
Any suggestions would be much appreciated. Thanks!
EDIT:: I am using STATA 14.1
I am trying to graph 4 lines that have shaded confidence intervals. I have the upper and lower bounds already and the data is formatted like below.
Code:
input float(year trendsm trendsl trendsh dgcl dgcm dgch gcl gcm gch al am ah) 2020 0 0 0 0 0 0 0 0 0 0 0 0 2021 .03 .01 .04 -.07 -.03 0 -.2 -.12 -.06 -.24 -.15 -.07 2022 .03 -.02 .07 -.22 -.12 -.04 -.54 -.34 -.2 -.64 -.42 -.23 2023 -.11 -.18 -.05 -.55 -.38 -.25 -1.1 -.78 -.53 -1.3 -.92 -.59 2024 -.12 -.22 -.02 -.78 -.52 -.34 -1.63 -1.15 -.78 -1.93 -1.37 -.88 2025 -.26 -.4 -.12 -1.16 -.82 -.57 -2.13 -1.54 -1.08 -2.61 -1.89 -1.26 2026 -.23 -.42 -.05 -1.37 -.95 -.62 -2.34 -1.68 -1.15 -3.05 -2.21 -1.46 2027 -.33 -.56 -.12 -1.7 -1.2 -.81 -2.59 -1.87 -1.3 -3.55 -2.62 -1.76 2028 -.43 -.69 -.19 -2.02 -1.43 -.99 -2.73 -1.98 -1.37 -3.99 -2.99 -2.04 2029 -.36 -.66 -.09 -2.17 -1.51 -1.01 -2.67 -1.9 -1.27 -4.25 -3.19 -2.16 2030 -.46 -.8 -.16 -2.48 -1.76 -1.19 -2.77 -1.98 -1.34 -4.66 -3.54 -2.43
After searching I found drarea but I could only get it to work for 2 intersecting areas not 3.
Any suggestions would be much appreciated. Thanks!
EDIT:: I am using STATA 14.1
Comment