I have a dataset with 30 variables containing one ICD-code each. I need to identify certain specific codes among these in order to create a new variable indicating whether certain specific codes are present or not (coded as 0 or 1). I've been told that perhaps a "for loop" could work, but I'm not sure how to do this. Any pointers?
Related Posts with For loop
Logit: classification vs rocI am running a logit, and thereafter I do: Code: estat classification lroc Weirdly (seems weird t…
Gsem with logit dependent variableHello everyone, Our model is described as pic. convert is dummy variable Code: gsem (p1 p2 p3 &l…
Comparing a variable acorss many categoriesI want to test that a variable does not differ by group. I get how to do it between two groups but n…
estat classification - return matrixi am running a logit and then estat classification when i do Code: return list stata shows Code:…
Copy over variable labels when standardizingI have a dataset with over 300 variables and 80000 observations. A bunch of the variables are on sca…
Subscribe to:
Post Comments (Atom)
0 Response to For loop
Post a Comment