Hi! I am new to STATA and I am trying to recode a variable with 40 values. For values 1 to 38, i want to keep their original codes so Im effectively just recoding 39 and 40. Is there a syntax to code 1 to 38 so that they keep their original values instead of having to type recode var (1=1) (2=2) (3=3)...?
Thanks
Related Posts with Tip with recoding 40+ values in a variable
calculating unique occurrence of variableHello everyone, I have got a panel data set consisting of 12 waves. Every individual has got a uniq…
Variability over time of positive and negative valuesHello, I'm interested in calculating the variability over time of a variable that can takes either …
Transferring coefficients across multiple datasetsHi Everyone, I have the following problem: I have dataset A and B. I am running several (like 5 va…
Difficulty aggregating variables to the unit of analysis without losing or altering dataHello, I'm a first year grad student that is fairly new to Stata. I'm working on a project in which…
bysort gen n = _n with if condition 1/2/3/4 is trueHello everybody, I have a hospital list (ik) doing several surgeries (haupt_op). Now I want create a…
Subscribe to:
Post Comments (Atom)
0 Response to Tip with recoding 40+ values in a variable
Post a Comment