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
Urgent: How to change the relationship according to HH serial numberDear All, How can I select and create a new data set with all household heads and those household w…
How do i transform categorical variables to continuous scores?Hello Statlist, I am working on the Health Information National Trends Survey (HINTS) which has 7 v…
Standardising variables across waves in panel data analysis - how?Good morning all from a very gloomy Ireland where we have just reported our highest daily number of …
create new variable with multiple conditionsHello expert stata I'm new to stata. I had an exercise from the class for analysing the data. the fi…
weighting dataI have an unbalanced panel data, and I'm trying to weight my sample to look like the population. sup…
Subscribe to:
Post Comments (Atom)
0 Response to Create a variable (0/1) based on multiple variables containing string
Post a Comment