Stata and Stata Forum Beginner here.
Situation: Using Limesurvey data for a health-related QOL study. This has questions where the responses range from things like 'none of the time' to 'all of the time'.
Exporting the responses often results in strings (with non-numerical characters) where I would want numerical values as a code. So I searched up the encoding command. (the alternative would be to use global find and replace on excel but I want to find a way to do this on Stata, so I can instantly transform any new responses appropriately using a do file).
Problem: Encoding option encodes some of the responses in unusable ways. For example with the 'none of the time' and 'all of the time', I would want the first to be 0 and the last to be 5 etc but it instead will code it in an illogical order with the first being 3 and the last being 4 etc, which makes regression results nonsensical. Although I understand why Stata cant encode it exactly how it would make sense without further information. Unfortunately Limesurvey cant export the answers in any different way. (Limesurvey isnt great at exporting to Stata even with a specifically designed Stata xml plugin).
Question: Is there a way to exactly tell Stata how to encode such responses? Or a better way to assign numerical codes to the string answers from the survey rather than encode?
Any help would be greatly appreciated as I'm up against the clock. Let me know if any further information is needed, again I'm new here so not sure what should be provided.
0 Response to Transforming survey results to numerical codes appropiately (Encoding help)
Post a Comment