Hey everyone,
I have received a data set where the sender incorrectly assigned the wrong codes for my sex variable. Instead of having male, female, and other as 0, 1 and 2 respectively; they have instead assigned 1 as male, 2 as female, and 3 as other. I have tried to fix this with my commands and while it works for female and other, when typing the command for male replaces it with 3.
I would like to replace the code for male from 3 to 0. Is there a way to change the label codes itself?
Thanks very much for the help!
Related Posts with Changing Label Code in Label
Creating a new dummy based on 4 conditionsHello everyone! We are stuck with a problem creating a new dummy variable from a data with many dum…
Westfall-Young correction for multiple hypothesis testing, with factor variablesI am implementing the Westfall-Young (1993) free step-down resampling methodology to correct for mul…
Multilevel modelling and interrater reliability calculation trough ICCDear Statalister, I have a doubt about how to replicate into Stata syntax a procedure followed by a…
Correlation between pairs of responses for one variable (icc and spearman)Hi stata users! I am using Stata 15.1 on Mac. I want to investigate correlations between two people…
Loop, sequence, and save with new name each timeLet me see how best i can explain my situation: I have a program that I want to loop I want the loo…
Subscribe to:
Post Comments (Atom)
0 Response to Changing Label Code in Label
Post a Comment