Dear Statalist,
I am trying to plot local polynomial smooths (twoway lpolyci [y) to display the evolution of probabilities/percentages over time.
However, when the value is close to 0, the confidence interval includes negative values which is impossible. I would like to crop the graph in order to not show the negative values, and so that the lower CI would start at an x-value that is such that the probability (y-axis) is non-negative.
I know that yscale and ylabel do not work since those can only expend the range of values but not crop it. The closest I could get was by specifying a plot range such that the bottom margin is negative : plotregion(margin(0 0 -10 0)) for example. However, the confidence interval is still displayed and super-imposed to the legend. I also have vertical lines, and they start from those negative y-values that I don't want thus they are also superimposed to the legend.
So, how can I find a way to crop the lower part of the graph (where the CI includes negative probabilities) ? Is that even possible ?
Thank you a lot --G
I am trying to plot local polynomial smooths (twoway lpolyci [y) to display the evolution of probabilities/percentages over time.
However, when the value is close to 0, the confidence interval includes negative values which is impossible. I would like to crop the graph in order to not show the negative values, and so that the lower CI would start at an x-value that is such that the probability (y-axis) is non-negative.
I know that yscale and ylabel do not work since those can only expend the range of values but not crop it. The closest I could get was by specifying a plot range such that the bottom margin is negative : plotregion(margin(0 0 -10 0)) for example. However, the confidence interval is still displayed and super-imposed to the legend. I also have vertical lines, and they start from those negative y-values that I don't want thus they are also superimposed to the legend.
So, how can I find a way to crop the lower part of the graph (where the CI includes negative probabilities) ? Is that even possible ?
Thank you a lot --G
Comment