Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Doubt about frequencies


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Doubt about frequencies
Date   Mon, 21 Jul 2003 16:16:59 +0100

Rodrigo Brice�o

> I have tried to calculate some simple
> frequencies using
> the tabulate procedure in a database of hospital discharges
> of 276,608
> observations. Every time I ran the procedure I got the
> message "too many
> values". I decided to increase memory size from 32m until
> 258m with the set
> memory procedure, but still got no answer. I translate the
> data to SPSS and
> I found that there are 3992 different frequency values. Is
> there a way to
> calculate the frequencies in STATA avoiding the message
> "too many values"?
> I'm using Stata 7. Database has 52 variables and their size
> is 76 MB.

I doubt that the problem here lies in the number of
observations, or the number of variables, or how many megabytes
you have, or that you offer to Stata.

It is probably either the number of row categories
or the number of column categories, and some limit
of -tabulate-.

-help limits- gives limits as follows, for Stata 8, with
a footnote about the Macintosh not repeated here:

-tabulate-                         Small    Intercooled             SE
# of rows in one-way table           500          3,000         12,000
# of rows & cols in two-way table 160x20         300x20       1,200x80

So you are hitting one of these limits.

I am not clear whether you want a one-way table or a two-way table.

Let me guess one-way. Even in that case it looks as if you
need to upgrade from Intercooled to SE. Send your money today
to Stata Corp. Or do it this way:

bysort myvar: gen freq = _N
egen tag = tag(myvar)
list myvar freq if tag

What about two-way? Same idea applies.

bysort myvar othervar: gen freq = _N
egen tag = tag(myvar othervar)
list myvar othervar freq if tag

Nick
[email protected]

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



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