Dear All,
Thank you a lot, it worked!
BR
ziad
On Mon, May 26, 2008 at 8:16 AM, John Ataguba <[email protected]> wrote:
> Hi Ziad,
>
> I do not know how to reply using the stata list.
>
> WHat you are requesting can be done using the egen command.
>
> The syntax is:
>
> egen minval = rowmin(drug1 drug2 drug3 drug4 drug5 drug6)
>
> Hope this solves the problem.
>
> Regards
>
> Jon
>
> ----- Original Message ----
> From: Ziad El-Khatib <[email protected]>
> To: [email protected]
> Sent: Monday, 26 May, 2008 4:45:02 PM
> Subject: st: Chosing minimum value out of 6 variables
>
> Hi,
> I have adherence level for 6 different drugs (drug1, drug2, etc..),
> inside cohort datafile, followed over 12 months.
> At every visit there are data for 3 out of 6 drugs and I want to have
> new variable having the minimal value for drug adherence, example
> below
>
>
> id visit drug1 drug2 drug3 drug4 drug5
> drug6 minval
> 1 2 10 20 30 . .
> . 10
> 2 2 40 30 . 50 .
> . 30
> etc..
>
>
> any tips?
>
>
> Thank you in advance and best regards
> ziad
> *
> * 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/
>
> ________________________________
> Sent from Yahoo! Mail.
> A Smarter Email.
--
Ziad El-Khatib
AIDS Unit
National Institute for Communicable Diseases (NICD)
1 Modderfontein Road
Private Bag X4, Sandringham, 2131
Johannesburg, South Africa
Mobile: +27 (0) 72-52 39 716
Phone: +27 (0) 11-386 6433
Fax (NICD): +27 (0)11 386 6453
Fax (connected to my email): +27 (0)86 18 2871
http://www.nhls.ac.za/div_nicd.html
Division of International Health (IHCAR)
Karolinska Institutet
www.phs.ki.se/ihcar
*
* 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/