[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: collapse
egen newvar = mode(oldvar), by(groupvars)
Then reduce to one observation per groupvars.
Note that there are some options on -egen...mode-, which you may want to
See -help egen-.
I also have an alternative mode function (regarding how it handles ties);
write me privately if you want to have it.
At 03:36 PM 2/23/2004 -0500, Adrian wrote:
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?
Institute for Policy Studies
Johns Hopkins University
* For searches and help try:
- st: collapse
- From: "de la Garza, Adrian" <ADelagarza@imf.org>