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
Make an exception within a loopI'm using version 15 of stata, and I'm wondering if it is possible to make an exception within a loo…
Individual time span reference per observationDear community, I have a dataset with about 3 million observations. Each observation has a time id,…
Var storage type is "byte", but presented as text in data editorHow do I see the assigned value to each text? …
add one variable from one dataset to another one: error variable V2 does not uniquely identify observations in the master dataHell everyone, I have a dataset with V2 - country code (in the codebook each country has a code so…
SUTVA assumption in endogenous treatment effect modelI have following model: eprobit y x, entreat(trtvar = x z) I suspect my treatment variable is endoge…
Subscribe to:
Post Comments (Atom)
0 Response to Tip with recoding 40+ values in a variable
Post a Comment