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]

st: RE: how to draw several kdensity curves in one graph


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: how to draw several kdensity curves in one graph
Date   Tue, 2 Mar 2010 22:46:45 +0100

<>

*******
clear*
set obs 5
gen byte year=_n
expand 1000
gen income=rchi2(5)+year
twoway (kdensity income if year==1) (kdensity income if year==2)  /* 
 */ (kdensity income if year==3) (kdensity income if year==4)  /* 
 */ (kdensity income if year==5)
*******


HTH
Martin


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of G. Dai
Sent: Dienstag, 2. März 2010 22:04
To: [email protected]
Subject: st: how to draw several kdensity curves in one graph

dear all,
I have income observation from several different years. For each year, I
can
easily draw a density curve by using kdensity. however, I'd like to have the
distribution
curves for different years on the same graph. how can I achieve that?
regards,
Guang

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


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