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
Counting distinct values cumulatively by groupDear Statalist, I have a question about constructing count variable. Please refer to my sample data…
Problem with several weights from different waves for the same individualGood day, I am a final-year Economics student and I'm working on the thesis which involves economet…
Generating observations for a variable in an extension of dataI have extended a data set that previously included quarterly data from 2001Q1 (represented as eg yq…
Hausman vs Sargan-Hansen testI would like to test whether FE or RE model is more appropriate, however I suspect clustered errors …
Help using cond and collpase in a panel gravity modelDear all, I am a bit confused and I would be happy to get some suggestions. Here is the problem. I …
Subscribe to:
Post Comments (Atom)
0 Response to How to recode a trinary variable into a binary
Post a Comment