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
Is there an arbitrary scaling factor in logistic regression in Stata?Hi, Norton et al state in a recent JAMA guide that the magnitude of the odds ratio from a logistic …
2SLS estimationHello, I would like to estimate the following 2SLS panel regression: First stage: Zit = α Wit*Fit +…
output coeffs and CI from looped cox regressionHi there, I need to run a cox regression over 21 pollutants (many times) and I want to then output H…
Merging two data sets: weighting help?Hi All, I am working to merge two separate data sets, each with their own sampling method and weight…
New package -checkipaddresses- on SSC : identify IP addresses behind VPN/VPSThanks to Kit Baum, my checkipaddresses is available from SSC. checkipaddresses queries an IP addre…
Subscribe to:
Post Comments (Atom)
0 Response to How to recode a trinary variable into a binary
Post a Comment