A program containing an -egen- function was published
as part of the -egenodd- package in STB-50 and revised
in STB-57. Try
. search egenodd
There is also another -egen- function on Stas Kolenikov's
website. Try
. search _grmedf
The program in STB-50/57 (download the latter) is
conservative in trying to do things in place without
restructuring, so won't perform if #variables > #obs.
I think Stas' program makes no such stipulation, but
conversely you might encounter memory problems with
it.
Otherwise, the FAQ at
http://www.stata.com/support/faqs/data/reshape3.html
explains how to do this with a double -reshape-, but
this could be awkward.
I found most of this out by using more general search
terms in -search- and -findit-. If you can't program
much in Stata, that puts a premium on being able
to find existing programs.
Nick
[email protected]
Nick Thomas
> I need to calculate a median across rows of data. Is there an
> equivalent to
> rmean that would do this? I had considered transposing the
> data and using
> tabstat but the data structure makes this rather messy. My
> Stata programming skills are poor.
*
* 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/