Dear All,
I have a small problem. I have been trying to something for a while but it is not is solved. I want to assign values from one variable as labels to another. For instance, there is a variable XYZ with 0.01, 0.03, 0.05 etc. as float. and there is another with 1, 2, 3 etc. for each respective value of XYZ. I want to label values 1, 2 as 0.01 and 0.03 respectively (for eg.).
I tried using a command labmask but it didnt work well, and I cannot understand why. It uses the label 0.06 for instance but displays .0599999986588955.
The code I ran was :
Thank you,
Pranav
I have a small problem. I have been trying to something for a while but it is not is solved. I want to assign values from one variable as labels to another. For instance, there is a variable XYZ with 0.01, 0.03, 0.05 etc. as float. and there is another with 1, 2, 3 etc. for each respective value of XYZ. I want to label values 1, 2 as 0.01 and 0.03 respectively (for eg.).
I tried using a command labmask but it didnt work well, and I cannot understand why. It uses the label 0.06 for instance but displays .0599999986588955.
The code I ran was :
Code:
egen unemp_cat = cut(unemp_current), at(0.03[0.01]0.18) egen unemp_cat1 = cut(unemp_current), at(0.03[0.01]0.18) icodes labmask unemp_cat1, values(unemp_cat)
Thank you,
Pranav
Comment