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
what is the correct specification of lagged variables using xtpmg ?Hi everyone, I'm using xtpmg to run an ardl model on panel data using the pooled mean group estimato…
FrequencyHi everyone, I want to calculate the cumulative frequency of firms which have different identifiers …
Panel dataHi everyone ,I have panel data from BHPS and i want to use descriptive statistics (one table and one…
Question for logistic regression analysisGreetings, If i have an ordinal dependend variable , which is a 5 scale likert skala and i want to …
Program to calculate a percentile and rank by percentile and a factorI have a dataset that looks like this, 2 observations per id: id observation birth year diabetes …
Subscribe to:
Post Comments (Atom)
0 Response to Querying multiple variables at a time
Post a Comment