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

RE: st: RE: How to find Max value.


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: How to find Max value.
Date   Sat, 19 Jun 2004 20:26:56 +0100

The Stata solution is immaterial here. Providing 
code avoids the issue of whether the results 
are of any statistical or scientific use. 

Nick 
n.j.cox@durham.ac.uk 

Rijo John
 
> One simple solution would be, I think, to use the egen 
> command with the
> max option. for example
> 
> egen maxval=max(mf) if temp==26, by(time)
> This will generate a new variable with the max of mf. then  
> may be you can
> give a count command (again using egen) and get the percentages.....
> 
> Nevertheless there may be easier ways to do this also....

Syed O Masood

> :I have put a piece of data below.
> :I need to find what percent of people have maximum
> :value in the variable rf at time 1 and temp 26, what
> :percent of people will have maximum value of mf at
> :time 2 and temp 26, what percent of people have max
> :value of mf at time 3 and temp 26 and similarly for
> :tmep 35oC.
> :
> :Thanks in advance for your help & support
> :
> :. list temp time mf
> :
> :     +---------------------+
> :     | temp   time      mf |
> :     |---------------------|
> :  1. |   26      1     5.5 |
> :  2. |   26      2    8.64 |
> 

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index