Hi everyone,
I am working in a database where each patient has fifteen procedure variables: proc1 proc2 proc3 ... proc14 proc15
I would like to generate a new variable, "int", if any variable from proc1-proc15 == "intubation".
Is there a more efficient way to achieve this than:
generate int = 0
replace int = 1 if proc1=="intubation"|proc2=="intubation"|proc3=="in tubation"|proc4=="intubation"|proc5=="intubation"| etc etc etc
Thank you in advance!
Related Posts with Querying multiple variables at a time
Mediation analysis with 3 conditions categorical IVHello Statalist, I have some questions regarding to my mediation analysis as I'm very new to Stata…
Sensitivity Check of Longitudinal MediationDear all, I run a linear model to test for a mediation (outcome and mediator are both metric, the t…
Include all contrasts of categorical IV in margins after mlogitHi! I would like to visualize all contrasts of a categorical IV in an mlogit model, but am stuck on…
big panel data managementHi, I am struggling to manage my large panel dataset 300k observation over 36 months. I would be gra…
Analyze data on Continuous Glucose Monitoring or Flash Glucose Monitoring in various Diabetes TechnologiesHello Everyone, hope you all are safe and healthy I have been trying to analyze CGM/FGM data for t…
Subscribe to:
Post Comments (Atom)
0 Response to Querying multiple variables at a time
Post a Comment