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.
Related Posts with Transforming survey results to numerical codes appropiately (Encoding help)
Kalman Filter and VARMADears i have 3 variables being time, index and stock I would like to estimate a Kalman Filter for st…
How to resolve xtlogit issue with interaction?Hi I am new to Stata and the Forum and I also encounter issue with xtlogit. Appreciate any help: I r…
Rename variables within loop - ambiguous abbreviation errorHello, I have biannual files called "job_history" with a year suffix at the end (job_history_1992, j…
Multilevel models with complex survey designHi, I was hoping that someone at Statalist could help me with this. I’m trying to use multilevel log…
retain string starting with certain valueHello! I have some stock codes (the variable is called ticker) which start with different numbers a…
Subscribe to:
Post Comments (Atom)
0 Response to Transforming survey results to numerical codes appropiately (Encoding help)
Post a Comment