Hi all,
I've been struggling with attaching a label to a recoded variable. For a report, I am working with a categorical variable named 'country', with the variable label COUNTRY. This variable lists various European countries (for example: 26 = Poland, with the value label PL - Poland). I have had to do some recoding, so that the separate values for East- and West-Germany (East-Germany having the value '4', and West-Germany having the value '14') were merged into one value, namely 0. For this, I have used the following command:
recode country (4 14 = 0)
In order to give this new value 0 the label of Germany, I have used the following code.
label define country 0 "DE - Germany"
However, even though this label is accepted as a command, Stata does not seem to recognise the new label for this recoded variable. If I try to make a table, this is what it looks like:

In other words, all it shows is the new recoded value, and not its label. Similarly, if I type in the command codebook country, Stata informs me that one nonmissing value is not labelled.
Would anyone be able to help me out in properly attaching the value label to this new recoded value? I would be very grateful, as I've been scouring the internet for answers for hours now!
Thank you in advance
I've been struggling with attaching a label to a recoded variable. For a report, I am working with a categorical variable named 'country', with the variable label COUNTRY. This variable lists various European countries (for example: 26 = Poland, with the value label PL - Poland). I have had to do some recoding, so that the separate values for East- and West-Germany (East-Germany having the value '4', and West-Germany having the value '14') were merged into one value, namely 0. For this, I have used the following command:
recode country (4 14 = 0)
In order to give this new value 0 the label of Germany, I have used the following code.
label define country 0 "DE - Germany"
However, even though this label is accepted as a command, Stata does not seem to recognise the new label for this recoded variable. If I try to make a table, this is what it looks like:
In other words, all it shows is the new recoded value, and not its label. Similarly, if I type in the command codebook country, Stata informs me that one nonmissing value is not labelled.
Would anyone be able to help me out in properly attaching the value label to this new recoded value? I would be very grateful, as I've been scouring the internet for answers for hours now!
Thank you in advance
Comment