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)
Calculating correlation between dummy variables using pwcorrHi, fist of all I was wondering whether pwcorr is okay to use when I would like to calculate the co…
running regression separately for sub samples vs joint interaction termsHello everyone, I have a panel data set which comprises of 25 countries and 2000 banks. In order to…
Nested Optimization on MataI am trying to run a nested optimization routine for Empirical Likelihood with the following routine…
How to use loops to establish the following combinationsHi every one, Is there anybody know how to establish the following combination by the loops? Each c…
Making a health index with probit models and normalizationHi. I am currently trying to make a health index. you see my data below, being panel data sort by t…
Subscribe to:
Post Comments (Atom)
0 Response to Transforming survey results to numerical codes appropiately (Encoding help)
Post a Comment