Hi, I am using STATA 13. I am encoding a categorical variable from string to numeric. Then, I am using "label list" command to see the label values assig. I have two options and for OPTION 1 the command "label list" works. But not for the OPTION 2. Please help.
OPTION 1:
encode var1, generate (var1_n)
label list var1_n /*this works*/
OPTION 2:
encode var1, generate (var1_n)
drop var1
rename var1_n var1
label list var1 /*gives an error message "value label var1 not found" */
Kindly help me to figure out why option 2's renaming is not supporting with the "label list command". I have already completed my data cleaning with the OPTION 2.
Thanks!
OPTION 1:
encode var1, generate (var1_n)
label list var1_n /*this works*/
OPTION 2:
encode var1, generate (var1_n)
drop var1
rename var1_n var1
label list var1 /*gives an error message "value label var1 not found" */
Kindly help me to figure out why option 2's renaming is not supporting with the "label list command". I have already completed my data cleaning with the OPTION 2.
Thanks!
Comment