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
Bootstrap standard errors for a two step model and multiply imputed dataDear all, I am trying to account for sample selection into the selection of female and male wealth.…
Question about conformability: multiple imputation for measurement errorHi, I am trying to run a multiple imputation to correct for measurement error. Using "Int J Epidemi…
identical marginal effects after xtpoisson with fixed-effectsI am trying to estimate the impact of a program introduced in the US in 2007 on the yearly number of…
Not sorted error when trying to generate new lagged variablesHello, I am working on a project where I want to study how inheritances affect labour supply of rec…
How to deal with outliers in panel data set?Dear all, I am working on panel data set (220 Observations (Countries,years)), and after implementin…
Subscribe to:
Post Comments (Atom)
0 Response to Querying multiple variables at a time
Post a Comment