Bookmark and Share

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: extract values from kdensity graphic


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: extract values from kdensity graphic
Date   Wed, 2 May 2012 09:34:49 +0100

In practice,

gen sizer = round(size)

is a simpler way of degrading your data. Check by

scatter sizer size

Nick

On Wed, May 2, 2012 at 9:16 AM,  <[email protected]> wrote:
> * Hi Statalist,
> * I'm a beginner using version 8.
> * The following measurements were collected by a machine in my lab...
> clear
> input sampling_event size
> 1 94.74
> 2 94.89
> 3 94.95
> 4 94.97
> 5 95
> 6 95.05
> 7 95.08
> 8 96.11
> 9 96.22
> 10 96.24
> 11 96.27
> 12 96.27
> 13 96.27
> 14 96.32
> 15 96.34
> 16 97.19
> 17 97.26
> 18 97.26
> 19 97.32
> 20 97.34
> 21 97.39
> 22 98.41
> 23 100.62
> 24 100.69
> 25 100.69
> 26 100.76
> 27 100.76
> 28 100.76
> 29 100.84
> 30 100.91
> end
> list
> twoway (scatter size sampling_event)
>
> * My aim is to class these size values into categories (5 categories in
> the example shown).
> * kdensity will generate the following graphic...
>
> kdensity size , w(0.1) n(30)
>
> * The troughs of this graphic are a good way to define the bounds of each
> category.
> * Category_4, for example would include all size values larger than 98 and
> less than 99.
> * I'd like to extract these trough points as a kdensity post-estimation
> and output them as a new variable.
> * Is this possible?
>
> * Look forward to any advice the list has to offer.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index