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
Query about Zero Inflated Poisson RegressionI conducted a study on demand of cinema where cinema goers and non-goers both are respondent. and 51…
Changing yes/no observations into 1/0I have a list of variables that contain answers Yes and No, I am trying to replace them with 1 and 0…
New version of invdesc on SSCThanks as always to KIt Baum, a new version of the invdesc package is now available for download fro…
ARDL Error Correction Model InterpretationI am trying to estimate the relationship between real currency per capita (dependent variable) and d…
Reshaping dataHi, I have the following wide data. I want to convert it to long. Code: * Example generated by -da…
Subscribe to:
Post Comments (Atom)
0 Response to How to recode a trinary variable into a binary
Post a Comment