Hello everyone!
I am doing data preparation for my master thesis. I conducted a survey in which I used two differente likert scales, both of 5 points:
a) 1 Agree - 5 Disagree
b ) 1 Always - 5 Never
Case a). I have used the following command to label the string variables to number:
label define likert 1 "Strongly disagree" ///
2 "Somewhat disagree" ///
3 "Neither agree nor disagree" ///
4 "Somewhat agree" ///
5 "Strongly agree" ///
foreach v of varlist Worried_NC-Powerless_NC {
encode `v', gen(_`v') label(likert) noextend
drop `v'
rename _`v' `v'
}
--> This worked perfectly.
Case b). I used the same code:
label define likert 1 "Never" ///
2 "Sometimes" ///
3 "About half the time" ///
4 "Most of time" ///
5 "Always" ///
foreach v of varlist DifficultConcentrate_NC-TalkTooMuch_NC {
encode `v', gen(_`v') label(likert) noextend
drop `v'
rename _`v' `v'
}
--> This time it did not work, I got the following message:
label likert already defined
My question: is there any way to have two different likert scales, each with different label values?
Ultimately, what I want is to encode the string text into numeric.
Thank you!
I am doing data preparation for my master thesis. I conducted a survey in which I used two differente likert scales, both of 5 points:
a) 1 Agree - 5 Disagree
b ) 1 Always - 5 Never
Case a). I have used the following command to label the string variables to number:
label define likert 1 "Strongly disagree" ///
2 "Somewhat disagree" ///
3 "Neither agree nor disagree" ///
4 "Somewhat agree" ///
5 "Strongly agree" ///
foreach v of varlist Worried_NC-Powerless_NC {
encode `v', gen(_`v') label(likert) noextend
drop `v'
rename _`v' `v'
}
--> This worked perfectly.
Case b). I used the same code:
label define likert 1 "Never" ///
2 "Sometimes" ///
3 "About half the time" ///
4 "Most of time" ///
5 "Always" ///
foreach v of varlist DifficultConcentrate_NC-TalkTooMuch_NC {
encode `v', gen(_`v') label(likert) noextend
drop `v'
rename _`v' `v'
}
--> This time it did not work, I got the following message:
label likert already defined
My question: is there any way to have two different likert scales, each with different label values?
Ultimately, what I want is to encode the string text into numeric.
Thank you!
Comment