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
Problem with date formatI split a variable which had date and time together to one with just the dates. Now I am trying to c…
Automatic average calculationHey there I have another question. Here as example for the Grunfeld database: I need a code that cal…
directions of endogenous coefficients are the opposite in simultaneous equation modelHi everyone, I'm running simultaneous equation model (2 equations) but getting a weird result. My a…
inquire about ORDERED LOGISTIC REGRESSIONI am studying people's financial stress. I have a set of 10 items to measure financial stress (1-4 L…
categorical variable sample sizesHi, I am running a regression using the following code: Code: reghdfe incvote i.X controls, absorb…
Subscribe to:
Post Comments (Atom)
0 Response to How to recode a trinary variable into a binary
Post a Comment