I am using the user-written command -distplot- to graph reverse cumulative distribution curves of a continuous log-transformed variable, -over- a categorical variable.
My code is similar to the following:
sysuse auto, clear
gen lnmpg = log(mpg)
distplot lnmpg, over(foreign) reverse(ge) midpoint
This code graphs two lines with different start and end points (see attached .png). For example, in the "foreign" category, the top of the curve is not graphed until approximately lnmpg = 2.6, even though in theory all individuals have (probability > lnmpg) = 1 at X-axis values of lnmpg < 2.6.
I would like to know if there is an option in -distplot- to graph the lines when (probability > lnmpg) is precisely 0 or 1, and then determine the scale of the X-axis manually. My apologies if I have missed this information in the -distplot- help file or elsewhere on the Stata forum.
My code is similar to the following:
sysuse auto, clear
gen lnmpg = log(mpg)
distplot lnmpg, over(foreign) reverse(ge) midpoint
This code graphs two lines with different start and end points (see attached .png). For example, in the "foreign" category, the top of the curve is not graphed until approximately lnmpg = 2.6, even though in theory all individuals have (probability > lnmpg) = 1 at X-axis values of lnmpg < 2.6.
I would like to know if there is an option in -distplot- to graph the lines when (probability > lnmpg) is precisely 0 or 1, and then determine the scale of the X-axis manually. My apologies if I have missed this information in the -distplot- help file or elsewhere on the Stata forum.
Comment