Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Graphing multiple cdf's in the same graph (using either -distplot- or -cdfplot-)


From   Max.Livingston@ny.frb.org
To   statalist@hsphsun2.harvard.edu
Subject   st: Graphing multiple cdf's in the same graph (using either -distplot- or -cdfplot-)
Date   Mon, 4 Mar 2013 16:12:36 -0500

Hi all,

I'm trying to plot two cdf's on the same axis. -distplot- allows me to do 
this (simple example: distplot line var1 var2, lc(red blue)  ) , but 
there's a wrinkle in my data that makes this more complicated. The data is 
arranged such that var1 and var2 are never both non-missing. That is, for 
every observation where var1 exists, var2 is missing, and vice versa. I am 
able to graph this using kernel density:
twoway (kdensity var1, lp(solid) lc(blue))
 || (kdensity var2, lp(solid) lc(red))

But I can't seem to find a similar implementation for -distplot- (or 
-cdfplot- for that matter). If anyone has any ideas, I would greatly 
appreciate it.

Thanks,
Max


Max Livingston
Sr. Research Analyst
Microeconomic Studies
Research and Statistics Group
Federal Reserve Bank of New York
(212) 720-7894





This e-mail message, including attachments, is for the sole use of the intended recipient(s) and may contain confidential or proprietary information.  If you are not the intended recipient, immediately contact the sender by reply e-mail and destroy all copies of the original message.
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index