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

Re: st: Question about tabsort (shorter alternative)


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Question about tabsort (shorter alternative)
Date   Wed, 7 Aug 2002 19:43:34 +0100

Rodrigo Briceņo

I'm using one procedure that Nick [Cox] gave me few weeks ago. But I
have one
problem that I don't know how to resolve.

The solution provided was:

bysort clave1 : gen freq = - _N
egen group = egroup(freq clave1) , l(clave1)
tabulate group if group < 11

And I trying to use the same sintaxis to obtain from the variable
"diagnostico" the 10 most frequent diagnoses for an hospital.
The error ocurres in the second step of the procedure. The variable is
str40.

egen group=egroup(freq diagnostico), I(diagnostico)
I() invalid

>>> As indicated in the help, the option concerned is -label()-.
That is, you typed "I", as in "India",
whereas you should have typed "l", as in (say) "label".

Nick
n.j.cox@durham.ac.uk

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