|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Using tab command on strings, exceeding 65,536 limit
Jeff wrote:
I am using Stata 9 and want to get a simple tabulation by city. My file
consists of over 207,000 rows. When I type in "tab city" I get returned an
error R134 that warns me that I cannot encode more than 65,536 unique
values. When I do a select distinct sql statement in my Access table on
the same field there are only 3046 unique values.
------------------------------------------------------------------------
The full explanation to r(134) reads:
[P] error . . . . . . . . . . . . . . . . . . . . . . . . Return code 134
too many values;
(1) You attempted to encode a string variable that takes on more
than 65,536 unique values. (2) You attempted to tabulate a variable
or pair of variables that take on too many values. If you
specified two variables, try interchanging the two variables.
(3) You issued a graph command using the by option. The by-variable
takes on too many different values to construct a readable chart.
Your problem is not with (1) -encode- but with (2) -tabulate-.
To get the table desired, you could:
generate x=1
sort city
collapse (sum) x, by(city)
list
Hope this helps
Svend
________________________________________________________
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000 Aarhus C, Denmark
Phone, work: +45 8942 6090
Phone, mobile: +45 2634 7796
Fax: +45 8613 1580
E-mail: [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/