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: RE: merging two kernel density graphs into one


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: merging two kernel density graphs into one
Date   Mon, 24 Oct 2011 13:14:59 +0100

-save graph- is not legal Stata syntax. 

I don't understand the request. Probability [not population] density curves for quite different data can be superimposed, but usually they can not be combined otherwise. Much depends on what is meant by "combine". 

In addition, you appear to be confusing density with cumulative probability. 

-kdensity- has -generate()- options which can be used to keep the results. Then you can superimpose the curves on one graph. 

Nick 
n.j.cox@durham.ac.uk 

Wies Kestens

My problem concerns the merge of different graphs in stata.
Each graph is made using the -kdensity- command and then saved.
For example:
kdensity algeria
save graph algeria
kdensity albania
save graph albania

The y-axis of these graphs shows the population density and the x-axis shows the income.
I would like to merge those two graphs into one graph which would then 
give the combined population density on the Y-axis and the income on the
 x-axis.
For example:
when 50% of the people in Albania en 100% of the people in Algeria would
 earn 100$, the combined graph would state that 75% of the people earn 
100$, given they both have the same population.

No command I know of/could find information about is able to do this it seems.

Can someone point me in the right direction?

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index