Hi,
I have a lot of categorical variables that are coded differently, some as 1 to 3, some as 1 to 5, and so on.
There is no way to know from the names which ones are coded which way, so I am wondering if there is any method to detect the variables by the number of categories they have, and then recode them accordingly. e.g. I want variables with three categories to be labelled as "agree", "neutral, "disagree", and those with 5 as 'always', 'almost always', sometimes', 'often', 'never', and so on.
Please let me know if there is any way to achieve this.
Thank you.
I have a lot of categorical variables that are coded differently, some as 1 to 3, some as 1 to 5, and so on.
There is no way to know from the names which ones are coded which way, so I am wondering if there is any method to detect the variables by the number of categories they have, and then recode them accordingly. e.g. I want variables with three categories to be labelled as "agree", "neutral, "disagree", and those with 5 as 'always', 'almost always', sometimes', 'often', 'never', and so on.
Please let me know if there is any way to achieve this.
Thank you.

Comment