Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: first occurrence of the highest value


From   "Marginean, Horia" <[email protected]>
To   <[email protected]>
Subject   st: first occurrence of the highest value
Date   Thu, 19 Sep 2013 14:38:34 -0400

Dear Statalist,
 
I am relatively new to Stata and have difficulties solving this problem.
Below is the status of on ptid that has encountered toxicity grade 1 , 2, 3 -- wbc_gr
I would like to create a vlb that will identify the first occurrence of the highest value (grade). Vlb max_wbcgr  was created -- bysort ptid: egen max_wbcgr  = max( wbc_gr ) - to identify the highest grade. 
 
As well as a particular case -  to identify the occurrence of a specific grade.
 
wbc_gr   max_wbcgr 
-------------------
 1          3 
 2          3 
 2          3 
 3          3 
 3          3 
  .          3 
  .          3 
  .          3 
  .          3 
  .          3 
+-------------------+
 
Many thanks in advance for your help!
I am using Stata version 12.1 windows XP
 
Horia
--------------------
Confidentiality Statement - The contents of this e-mail, including its attachment, are intended for the exclusive use of the recipient and may contain confidential or privileged information.  If you are not the intended recipient, you are strictly prohibited from reading, using, disclosing, copying, or distributing this e-mail or any of its contents.  If you received this e-mail in error, please notify the sender by reply e-mail immediately or the Privacy Office ([email protected] ) and permanently delete this e-mail and its attachments, along with any copies thereof.  Thank you.

Avis de confidentialité ? Ce courriel, y compris ses pièces jointes, s?adresse au destinataire uniquement et pourrait contenir des renseignements confidentiels. Si vous n?êtes pas le bon destinataire, il est strictement interdit de lire, d?utiliser, de divulguer, de copier ou de diffuser ce courriel ou son contenu, en partie ou en entier. Si vous avez reçu ce courriel par erreur, veuillez en informer immédiatement l?expéditeur ou le bureau de la Protection des renseignements personnels ([email protected]), puis effacez le courriel ainsi que les pièces jointes et toute autre copie. Merci.
--------------------

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index