Hello,
I have a string variable. I have to collapse the data, so I'm encoding it using:
When I'm collapsing the data, the value labels generated by encode are being displayed. How can I get the names instead of value labels.
An example dataset:
Thank you.
I have a string variable. I have to collapse the data, so I'm encoding it using:
Code:
encode state, gen(state1)
An example dataset:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str35 ind_id str25 state "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001001" "Tamil Nadu" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001002" "Goa" "TUS10001106201913310301382332001003" "Bihar" "TUS10001106201913310301382332001003" "Bihar" "TUS10001106201913310301382332001003" "Bihar" "TUS10001106201913310301382332001003" "Bihar" "TUS10001106201913310301382332001003" "Bihar" "TUS10001106201913310301382332001003" "Bihar" "TUS10001106201913310301382332001003" "Bihar" "TUS10001106201913310301382332001003" "Bihar" "TUS10001106201913310301382332001003" "Bihar" "TUS10001106201913310301382332001003" "Bihar" "TUS10001106201913310301382332001003" "Bihar" end
Comment