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

st: Gen & replace

From   "Ziad El-Khatib" <>
Subject   st: Gen & replace
Date   Thu, 1 Nov 2007 15:19:26 -0700

Dear STATA lister
it might be simple question, but spent sometimes on it so far.
I want to calculate sum of missed pills on 3 out of 5 drugs (drug1,
Main drugs are drug1 and drug2, and the combination is either:
adherence level of:
drug1 + any 2 out of drug3,4,5
drug2 ?  any 2 out of drug3,4,5

All of these drugs have value 0 when they were not used.

i thought first to add them by typing
gen drugsum = drug1+drug2+drug3+drug+4drug5
I assume i will get total sum, but when i do ratio, STATA count with
patients with dug value 0.

Any tips how to exclude counting patients with drug value = 0?

Thank you in advance and best regards
*   For searches and help try:

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