[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

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:36:00 +0100 |

Ah! I think I misunderstood this. Sorry. Assuming also an identifier variable -id-, perhaps what you want is more like egen group = group(temp time), label egen max = max(mf), by(id) tab group if max == mf Nick n.j.cox@durham.ac.uk > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Nick Cox > Sent: 19 June 2004 20:23 > To: statalist@hsphsun2.harvard.edu > Subject: RE: st: RE: How to find Max value. > > > Thank you for the further detail. However, > if I understand correctly, you are asking a > very strange question here. Since -mf- > (presumably -rf- is the same thing or similar) > is measured to 1 or 2 decimal > places, the maximum is quite likely to be unique > for each subset (time and temperature), and the percent equal to the > maximum will just be 100 / number in subset. > Fortuitously, you may get tied values, but > it is difficult to believe that their frequency > would reflect properties of statistical > or scientific interest. In addition, if you attempt > to count how many values are equal to the maximum, > you are likely to run into the precision problems > detailed at [U] 16.10. > > Providing Stata code would just be giving > you the means of doing something bizarre, > I believe. > > Nick > n.j.cox@durham.ac.uk > > 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 | > > 3. | 26 3 12.03 | > > 4. | 35 1 8.64 | > > 5. | 35 2 5.59 | > > |---------------------| > > 6. | 35 3 9.02 | > > 7. | 26 1 3.88 | > > 8. | 26 2 8.63 | > > 9. | 26 3 10.35 | > > 10. | 35 1 8.34 | > > |---------------------| > > 11. | 35 2 10.22 | > > 12. | 35 3 11.25 | > > 13. | 26 1 3.29 | > > 14. | 26 2 6.12 | > > 15. | 26 3 7.37 | > > |---------------------| > > > > --- Nick Cox <n.j.cox@durham.ac.uk> wrote: > > > This isn't very clear to me. What percent > > > of anything is equal to the maximum value > > > is very sensitive to the resolution of measurement, > > > and as such doesn't seem a very obvious > > > thing to calculate. > > > > > > You may get a better answer if you give > > > an example table showing some data. > > > > > > Nick > > > n.j.cox@durham.ac.uk > > * > * 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/

- Prev by Date:
**RE: st: RE: How to find Max value.** - Next by Date:
**Re: RE: st: RE: Program stop half way when using nostop** - Previous by thread:
**RE: st: RE: How to find Max value.** - Next by thread:
**st: RE: Count** - Index(es):

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