[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Marking Levels of Categorical Variable
bysort var: generate byte more_than_ten = _N >= 10
will work for the ABCDE example (N = 100), but
local N `=_N'
bysort var: generate byte more_than_ten = _N / `N' >= 0.1
is more general, like Friedrich Huebler showed.
Joseph Coveney
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/