The -distplot- command written by Nick Cox has become my default for picturing cumulative distributions.
But does anyone know if it's possible with -distplot- to censor the CDF? An example would be where the data have a long right tail so that most of the graph is depicting the CDF near 1. In this case a clearer picture might emerge if the graph could be censored at some not-so-large value of the data, much like many familiar pictures of Kaplan-Meier curves in clinical studies involving, say, administrative censoring.
The desired picture could be obtained by using the -cumul- command, e.g.
But using -distplot- would be preferable.
Note that using "if price<10000" with -distplot- does not provide the desired result.
It may be that this is not currently a feature of -distplot- but if anyone knows differently I'd be grateful to know. Thanks in advance.
Code:
search distplot
The desired picture could be obtained by using the -cumul- command, e.g.
Code:
sysuse auto sort price cumul price, g(cprice) tw scatter cprice price if price<10000, s(i) c(l) ylab(0(.2)1)
Note that using "if price<10000" with -distplot- does not provide the desired result.
It may be that this is not currently a feature of -distplot- but if anyone knows differently I'd be grateful to know. Thanks in advance.
Comment