Hello,
I want to tell stata to create a variable giving a code of 0/1 based on around 200 variables containing string. If any values within those 200 variables contain F20 or F21 I want the new variable to be 1. Any advice greatly received. I want it to ignore any missing values but if all 200 values are missing I would want the new variable to give a missing value not a 0.
Related Posts with Create a variable (0/1) based on multiple variables containing string
New version of cprdlinkutil on SSCThanks as always to Kit Baum, a new version of the cprdlinkutil package is now available for downloa…
logistic regressionI am doing a regression analysis with hospitalisation as my dependent variable and polypharmacy as m…
How to add a variable from 1 data set to another?I have two data sets from 2001 to 2005 and 2006 to 2010, and I want to compare performances of peopl…
not getting the cd command rightHi everyone, I know this is a simple issue - but I simply can't get the cd command to work and I do…
Adding variable from one STATA data set to anotherDear Statalist users, Good day to you firstly. I have 2 STATA datasets, where I'd like to transfer …
Subscribe to:
Post Comments (Atom)
0 Response to Create a variable (0/1) based on multiple variables containing string
Post a Comment