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: Distributional graph


From   "Radwin, David" <[email protected]>
To   <[email protected]>
Subject   RE: st: Distributional graph
Date   Tue, 11 Mar 2014 16:24:29 -0400

You might be able to use -twoway kdensity- instead, like

. clear
. set obs 2
. gen year = 2000+_n
. expand 100
. gen x =runiform()
. twoway (kdensity x if year==2001) (kdensity x if year==2002)

David
--
David Radwin, Senior Research Associate
Education and Workforce Development
RTI International
2150 Shattuck Ave. Suite 800, Berkeley, CA 94704
Phone: 510-665-8274

www.rti.org/education


> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Nick Cox
> Sent: Tuesday, March 11, 2014 1:18 PM
> To: [email protected]
> Subject: Re: st: Distributional graph
> 
> Use the -generate()- of -kdensity- to generate the density function
> and then fire up your own -line- plot.
> 
> Nick
> [email protected]
> 
> 
> On 11 March 2014 20:11, Theophilus Dapel <[email protected]> wrote:
> 
> > I have two-year stacked dataset. How do produce kdensity of two
lines,
> one for each year on the same graph?

*
*   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/


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