[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

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

Subject |
RE: st: frequency of continuous variables |

Date |
Thu, 26 Jun 2008 11:22:32 +0100 |

More generally, there are at least two ways to do this. First, produce a new classified variable and then -tabulate- it. The example here could have been gen upper = 10 * ceil(wage / 10) tab upper Second, produce a table on the fly. -tabcond- on SSC has some limited functionality in this respect. Nick n.j.cox@durham.ac.uk Martin Weiss -egen, cut- is for you. -ta- afterwards.. Man Jia <jia.m@neu.edu>: > I was wondering how to show frequency of a continuous variable in > several ranges. For example, the variable "wage"measured with dollars > and cents. In my data set, there are lots of values for this variables > since people's wages are usually different from others. The command > "tabulate" shows exactly frequency of each value. That's not what I > want. I'd like to see the following information: > > range of wages frequency > <=0.00 ?? > (0.00, 10.00] ?? > (10.01,20.00] ?? > (20.01,30.00] ?? > ..................... > > I know I could find number of observations in each range by using sum > if wage <=0.00 > sum if wage >0.00 & wage <=10.00 > etc. > * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: frequency of continuous variables***From:*Man Jia <jia.m@neu.edu>

**Re: st: frequency of continuous variables***From:*Martin Weiss <martin.weiss@uni-tuebingen.de>

- Prev by Date:
**st: RE: Changing the width of the box in a boxplot** - Next by Date:
**st: RE: Problem with METAN (forest plot)...** - Previous by thread:
**Re: st: frequency of continuous variables** - Next by thread:
**[no subject]** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |