Hello. I'm new to Stata, and I have a quick question.
I have a variable "size" in my data base :
1 if small
2 if medium
3 if large
I am looking to recode it into a binary variable of category 0 to 1 (1 being small and 0 being medium-large). I also have to rename the tags so that in my database, the variable displays "small" and "medium-large", rather than 1 and 0. I'd rather do that in one line (but if it is more, it's not a big issue). How can I do ?
Thank you for your help.
Related Posts with How to recode a trinary variable into a binary
Create consecutive days with unequal number of obs per dayDear Stata folks, I have a dataset with patient_ids, days and a measurement(outcome). Patients may …
Panel specification- choosing the best modelHi, I try to model panel data with N=28 and T=15 (tsset number year). I have one binary variable in …
couting unique observation id sales profit year size_group a 36 9 1991 1 a 48 17 1992 1 a 25 7 1993 2 b 65 18 19…
Modelling dose with multiple balancing score. Imbens (2000)Good day statlisters , please I am interested in applying propensity using modelling dose of treatme…
Issue with xtologit (non concave routine)Hallo everybody I ask for your help to manage an issue as described in the object of this post. I am…
Subscribe to:
Post Comments (Atom)
0 Response to How to recode a trinary variable into a binary
Post a Comment