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: RE: calculating proportions

 From Ekaterina Hertog To "statalist@hsphsun2.harvard.edu" Subject Re: st: RE: calculating proportions Date Mon, 20 Feb 2012 23:29:53 +0000

```Hi Nick,
```
thank you for the advice. i looked at all the 3 packages you recommended and thought that relrank could do what I want, but having run it I realise that I am not sure how rank was calculated.
```I used the following code:
relrank income if sex==1, ref(income if sex==2) g(rank)

```
My dataset contains 4132 women. 268 of them have income=0. That means that in case of a man whose income is 0(zero) 6.48% of women earn as little as he does. My new variable rank takes the value 0.0648 in this case, seemingly corresponding to the 6.48% of women whose income equals 0. However, if I look at different income level (say 500). 6% of all women earn 500, but the value of rank in this case is 0.93. I have looked at the help file, but am still no quite clear what is going on.
```Ekaterina

On 20/02/2012 12:19, Nick Cox wrote:
```
```Look at these modules on SSC:

relrank (Ben Jann)
invcdf (Ben Jann)
ppplot (Nick Cox)

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

Ekaterina Hertog

I use Stata 12. I have a dataset which includes id number, sex and
income information for every individual. I would like to construct for
every man 3 variables: what is the proportion of the total female
population that earns as much as he does, that earns less than he does,
and that earns more than he does. I have tried creating a table which
gives me frequencies of individuals by sex by income, but am getting
stuck at that stage.

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