Statalist


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

RE: st: bottom to top or reverse cumulative distribution in table command?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: bottom to top or reverse cumulative distribution in table command?
Date   Thu, 21 Jan 2010 13:08:56 -0000

Thanks to Kit Baum, a revised version of -groups- with an extra -ge- option has been placed on SSC. I believe that option suits Stefan's problem. 

Stata 8 is required. 

For an overview without installation:

. ssc type groups.hlp

For installation or re-installation, use -ssc- or -adoupdate-. 

As someone, some day, may want cumulatives to be "less than" rather than "less than or equal to" I will shortly add an -lt- option. 

Past Fortran (or FORTRAN) users may enjoy a brief moment of nostalgia. 

Nick 
[email protected] 

Nick Cox

I'll look at -groups- to see if this functionality can be added. 

[email protected]

Thanks to Martin, Maarten and Nick for your help!

There are many ways to calculate reverse cumulative distributions in a do file and I already have used that. What I was looking for was a quick and easy solution. I often have people on the phone asking for results and it occurred to me that I couldn't produce this kind of data on the fly (calculation in the head is one option but may be error-prone while talking on the phone). 

- "cumul, equal" works, but requires some additional programming.

- "groups, show(rvpercent)" is very flexible but - as far as I see  - not exactly what I wanted. Options like RVpercent, rpercent or Rpercent produce reverse cumulative distributions of the type "percentage of cases bigger than x" , not "bigger than or equal to x". It works but for "equal or bigger" one has to pick the result from the previous line.

- reversecum works fine. It's a bit slow (compared to the tabulate-command) with big datasets because of the use of preserve, contract and restore, but produces what I was looking for. 


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index