One way is to form classes by lower class limits:
. gen to_table = 5.34 + 10 * floor((yourvar - 5.34)/ 10)
. tab to_table
A brief discussion of -floor()- and its sibling -ceil()-
as ways of rounding down and up systematically will
appear in Stata Journal 3(4) 2003. In your case -int()-
would work as well.
Nick
[email protected]
Andreas Aschbacher
> I have one column with 700000 real-values from 25.34 to 344256,75 in
> ascending order.
> I want to create intervalls such as from 25.34 to 35.34 and
> from 35.34 to
> 45.34 and so on
> (equidistant steps) until maximum.then I want to count the
> values in each
> intervall,for
> example:
> from 25.34 t0 35.34 27 values
> from 35.34 to 45.34 377 values
> and so
> on
> how to realize this problem ? i tryed with
> table,tabstat,tabulate but I wasn't successful,
*
* 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/