Hi all,
I have a ordinal variable with 4 levels, when I upload my data, STATA recognizes it as a string variable so I decided to code it as numeric and then label it properly. The first time I used this code it worked fine, but today for some reason STATA is labelling my variables wrong - and when I mean wrong, the frequency of each level is mixed up. I am not sure what to do!
This is my code:
encode category1, generate(ncategory1)
label define ncategory1 2 "Health maximiser" 1 "Pro-non-cancer" 4 "Strong prioritarian" 3 "Weighted prioritarian", replace
When I used the tabulate function before I obtained these results (Check image right.jpg)
Array
but now I am obtaining results which are mislabeled and missing (check image wrong.jpg) PLEASE HELP
Array
Related Posts with STATA labelling wrong?
Replacing observations by sum of other observations (same variable)Hello. I am trying to combine two observations in my dataset by replacing the value of a variable (…
Oaxaca_rif: How to account for indicator variablesHello, Does the oaxaca_rif command allow one to specify indicator variables (fixed effects)? If so,…
censored dependent variable with endogeneity + panel dataHello, I've been studying a lot through statalist, but it's my first time posting a topic. I have qu…
line graph of row percentage by different groupsHi Statalist, I am trying to generate a line graph. I am using four variables. My outcome, which wo…
xtreg, xtreg mle or xtmixed?Hello, I am having trouble understanding what the difference is between xtreg with random effects a…
Subscribe to:
Post Comments (Atom)
0 Response to STATA labelling wrong?
Post a Comment