you might want to try:
by id: egen VarM = mode(x)
collapse VarM, by (id)
It will give you the mode within each id.
rafa
----- Original Message -----
From: "de la Garza, Adrian" <[email protected]>
To: <[email protected]>
Sent: Monday, February 23, 2004 8:36 PM
Subject: st: collapse
> Dear Stata friends,
>
> I am trying to collapse some variables using the MODE as my descriptive
> statistic, but I see that -collapse- doesn't allow this. Any thoughts?
>
> Thank you.
> Adrian
>
> *
> * 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/
>
*
* 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/