Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: Row median


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: Row median
Date   Thu, 2 Dec 2004 11:50:44 -0000

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index