Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: How to plot cdf after corrected kernel density
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: How to plot cdf after corrected kernel density
Date
Thu, 3 Oct 2013 23:01:59 +0100
The bottom line in the post you cite advises
"I prefer to get smoother cumulative distribution functions directly from
estimated quantiles."
I agree with that.
Nick
[email protected]
On 3 October 2013 21:45, Jain, Monica (HarvestPlus) <[email protected]> wrote:
> I am using -kdens- and I do not know how to plot the cumulative distribution function. I am using Stata 13 for Windows.
>
> I am using -kdens- to estimate kernel density correcting for bounded variables using linear combination method. I want to plot the cumulative distribution function for the estimated kernel densities. On one of the statlist threads (http://www.stata.com/statalist/archive/2005-04/msg00798.html), the following method has been suggested to plot them:
>
> sysuse auto
> _kdens mpg, g(b a)
> cumul b, g(cb)
> line cb b, sort
>
> With the above command, I get the densities on the x-axis, rather than the [x]. I looked all over the web to check if I can find how to do it, but I have not been successful. If I use the following command:
>
> line cb a, sort
>
> I get weird triangle shaped graph.
>
> Monica Jain
> Postdoctoral Fellow
> HarvestPlus, IFPRI
>
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/