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
gsem covstructHello. I am running LPA analysis using gsem command. I ve run the analysis in R using the mclust com…
How to do matrix exponential operation in Stata? Code: matrix A = (1,0,0,0,0\0.6,0,.4,0,0\0,.6,0,.4,0\0,0,.6,0,.4\0,0,0,0,1) matrix list A matrix B…
WLS regression using regwls and regressDear All, I have a question regarding WLS regression using Stata commands regwls and regress and wo…
Generate balance tableHi, I'm trying to replicate this balance table (as in the picture) using some of the example dataset…
Inverted Normal GraphHello all, Admittedly a mundane question here... I'm simply trying to plot an inverted normal distr…
Subscribe to:
Post Comments (Atom)
0 Response to Create a variable (0/1) based on multiple variables containing string
Post a Comment