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?
Computing elasticities in a log-log model with stand-alone terms and interaction terms between categorical and log-transformed variablesDear Statlisters, I am running a log-log model with the following specification: regress lnY lnX1 ln…
Looping identify autosomal monosomies | regexmHello all: I am trying through loop through a string of karyotype to identify occurrence of "-1" th…
About clogit in interventional studyHello. I would like to ask your help about clogit. Interventional study was conducted, the data was …
Multiply obverations of a variable with a vector to creat a new data setHi experts! I am a beginner of Stata and looking for your help. I have data set 1 or matrix 1 (63x1)…
Create new variable using coefficient from a variable containing time dummyHello everyone, I'm using Stata version 14.0. I'm actually trying to estimate the natural rate of un…
Subscribe to:
Post Comments (Atom)
0 Response to STATA labelling wrong?
Post a Comment