st: AW: nummode option giving error message. why?

<>
The documentation for -egen- is indeed unclear on this point:
******
clear*
set obs 1000
gen x=1+int(10 /*
*/ *runiform())
gen byte dummy=_n<=`=_N/2'
bys dummy: egen mymode = /*
*/ mode(x), num(1)
******
The code leads to an error although the help file does not make the source
of the error clear - nor does the dialog box keep one from specifying -by-
and -nummode- simultaneously.
For -nummode(1)-, the equivalent
***
bys dummy: egen mymode = /*
*/ mode(x), min
***
works fine, so Dalhia can get what she wants...
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Dalhia
Gesendet: Mittwoch, 26. August 2009 23:16
An: statalist@hsphsun2.harvard.edu
Betreff: st: nummode option giving error message. why?
hi,
I am trying to use the nummode option for 'egen mode'. Here is the exact
command:
bysort name1: egen additionalcusip1=mode( cusip), nummode(1)
The same command when used with the maxmode or minmode option works fine,
but when I use nummode (which is what I need), stata gives me the following
error:
option nummode() may not be combined with by
Can anyone tell me why this is happening? Is this a bug in stata or am I
doing something wrong?
dalhia
*
* 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/
*
* 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/