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]

From |
Wies Kestens <wies.kestens@student.kuleuven.be> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
RE : st: RE : RE: merging two kernel density graphs into one |

Date |
Thu, 27 Oct 2011 10:20:16 +0000 |

This is indeed a methodological exercise and is not intended to be a strict or good approximation of reality. The countries will be weighted by their population but as this is the easier part of the problem, in my opinion, I won't be needing your assistance and didn't want to bother you with it. When I pooled all the income data I got a income density that indeed still varied with the bandwidth chosen. However, I don't think this method results in the same income densities as the income densities I would become when I could add up all the individual countries' income densities. However I'm not really sure about that. If the effect of different bandwidths were indeed the same, then my problem would be solved. Can anybody enlighten me on that? Thanks for your consideration ________________________________________ De : owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] de la part de Nick Cox [njcoxstata@gmail.com] Date d'envoi : mardi 25 octobre 2011 12:06 À : statalist@hsphsun2.harvard.edu Objet : Re: st: RE : RE: merging two kernel density graphs into one What you want is clearer, but I wouldn't approach it your way at all. If you pool income data for all countries, presumably weighting by population (which you don't mention, but the problem seems meaningless otherwise), you can then smooth that once to get a single density curve. Adding the densities of (again presumably hundreds of) countries, even with weighting, seems unnecessarily complicated by comparison. Your statement that -generate()- is limited to producing 10 data points I think only makes sense in one context, in which that is the default because you have just 10 data points. But if that is so, I wouldn't apply density estimation at all. Also, if you are starting with deciles alone you have already lost much of the detail and it is optimistic to suppose that kernel density estimation can put it back. However, as you hint the exercise could become an essay on limitations of method. There are people on this list who are top experts in income distributions who may want to add to this (or subtract from it). Nick On Tue, Oct 25, 2011 at 10:49 AM, Wies Kestens <wies.kestens@student.kuleuven.be> wrote: > Using the -kdensity- command, I become individual countries' income densities. I'm trying to estimate the world income density by adding up all these individual countries' income densities. It's important that I work with the estimated income densities and not just with the decile shares for each country because I want to compare the effect of different choices of bandwidth and such on the global income density. > > However, I can't figure out how to add op these different income densities. > > The -generate()-option is another approach to the problem. If I could extract 1000 or more points from the income density that would be the solution as that would be a fairly good approximation of the estimated income density. But the -generate()-option only extracts 10 points from each density and therefore doesn't help me. > > Thanks for your consideration > ________________________________________ > De : owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] de la part de Nick Cox [n.j.cox@durham.ac.uk] > Date d'envoi : lundi 24 octobre 2011 14:14 > À : 'statalist@hsphsun2.harvard.edu' > Objet : st: RE: merging two kernel density graphs into one > > -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/ * * 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/

**Follow-Ups**:**RE: st: RE : RE: merging two kernel density graphs into one***From:*Nick Cox <n.j.cox@durham.ac.uk>

**References**:**st: merging two kernel density graphs into one***From:*Wies Kestens <wies.kestens@student.kuleuven.be>

**st: RE: merging two kernel density graphs into one***From:*Nick Cox <n.j.cox@durham.ac.uk>

**st: RE : RE: merging two kernel density graphs into one***From:*Wies Kestens <wies.kestens@student.kuleuven.be>

**Re: st: RE : RE: merging two kernel density graphs into one***From:*Nick Cox <njcoxstata@gmail.com>

- Prev by Date:
**st: prvalue and loop rest(grmean)** - Next by Date:
**RE: st: RE : RE: merging two kernel density graphs into one** - Previous by thread:
**Re: st: RE : RE: merging two kernel density graphs into one** - Next by thread:
**RE: st: RE : RE: merging two kernel density graphs into one** - Index(es):