Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PleaseHelp: Converting likert to continous variable

    Hi Everyone. I have a questionnare (n=130). It is made up of a few variables that are measured by likert scale items. How do I turn them into a continous variable to know the correlations between them. I really need help, I am quite new to this and I need it for my master's

    Thanks
    Last edited by Salma Aboelmaaty; 27 Jul 2022, 13:30.

  • #2
    As you don't show an example of what data you have, it isn't possible to say what, if any, conversion needs to be done.

    If the organization of the data is that each of the variables that is measured by a likert scale is a single variable (column) in your data set and contains values like 1, 2, 3, 4, 5 then no conversion of any kind is necessary. Just use them as is. If you have a single column but the values in it are text strings like "strongly disagree," "disagree," etc., then there is work to be done. If, instead, such a variable is spread out over multiple columns, each corresponding to a single respone (e.g. one column for response 1, another for response 2, etc.) then, indeed there is different work to be done.

    So to provide useful help, we must see an example of your data. Please post back with that. To be sure that what you show contains all of the information needed (which is not just the values of the data but also information about their storage types and formatting, etc.) you must use the -dataex- command to post it here. If you are running version 17, 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    When asking for help with code, always show example data. When showing example data, always use -dataex-.

    Comment


    • #3
      Clyde Schechter
      Thank you so much for your generous reply. I have a variable for Public Service Motivation (8 Likert Items), Extrinsic Motivation (5 Likert Items and 1 categorical). Single likert items representing Satisfaction, Motivation and Pay Satisfaction .. All likert scales are coded as follows (Strongly Agree=5, Agree=4, Neutral=3, Disagree=2, Strongly Disagree=1). In order to measure correlations, I merged the mutiple items that feeds into each variable using egen rowmean (Is that correct?). I tried using pairwise correlations and spearman correlation. Both worked but I am not sure if they are as good as pearson's that is why i am asking if I can still use pearson's with the same data.

      Also kindly note that some items are reversed and in that case they are coded in reverse (for Example, Strongly Agree=1 this time). Moreover, there are ordinal items that measure performance on 5 levels and i treated it the same way as likert in order to get correlations (Example, Outstanding=5, Verygood=4, Good=3, Below Average=2, and Unsatisfactory=1) - I don't know if I handled both cases right
      .
      Below is a data example. I could not generate all variables on stata so I just picked some items. Thank you again for your more than generous and helpful response
      Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	35.9 KB
ID:	1675511

      Last edited by Salma Aboelmaaty; 28 Jul 2022, 07:24.

      Comment


      • #4
        you included a screenshot of the output of dataex. Using dataex is good, but including the output as a picture (screenshot) is bad. We can do nothing with pictures other than stare at them. What we need to do is include your example data in our version of Stata, and play with it till we diagnosed the problem and create a solution that we can than share with you. So instead of a screenshot you just select the output and copy it, and than paste it in the statalist message.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Maarten Buis Thank you so much for this tip and explanation.
          Below is part of the dataex copied and pasted. I couldnt include all variables though

          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input byte(psm1 psm2 psm3 psm4 psm5 er1 er2 er3 generalsatisfied paysatisfaction generalmotive) str13 perf str36 edu1 str9 age1
          4 4 4 4 4 4 2 4 5 4 4 "Outstanding"   "PhD"                                  "25-34"    
          3 5 5 5 5 3 2 4 3 4 3 "Outstanding"   "Bachelor's"                           "35-44"    
          3 5 5 5 5 5 3 4 1 1 3 "Outstanding"   "Bachelor's"                           "55-60"    
          2 2 2 1 2 5 5 5 1 1 1 "Outstanding"   "PhD"                                  "35-44"    
          3 4 3 2 3 5 4 5 3 2 3 "Outstanding"   "PhD"                                  "25-34"    
          2 1 1 5 5 5 2 5 2 2 4 "Very Good"     "PhD"                                  "25-34"    
          3 3 4 2 4 4 4 4 1 1 2 "Very Good"     "Bachelor's"                           "25-34"    
          3 5 4 4 4 4 4 4 2 1 2 "Outstanding"   "Bachelor's"                           "35-44"    
          5 3 2 4 4 5 4 4 3 2 2 "Very Good"     "Master's"                             "25-34"    
          1 3 4 2 2 5 5 5 1 1 1 "Very Good"     "Master's"                             "25-34"    
          5 5 5 5 5 3 5 2 3 3 4 "Outstanding"   "Bachelor's"                           "35-44"    
          1 5 4 1 1 5 4 5 3 3 3 "Outstanding"   "Bachelor's"                           "35-44"    
          3 5 4 5 4 4 4 4 3 4 2 "Outstanding"   "PhD"                                  "55-60"    
          5 5 5 5 4 2 5 2 3 4 4 "Outstanding"   "Bachelor's"                           "35-44"    
          2 5 3 4 4 5 5 5 4 1 4 "Very Good"     "Bachelor's"                           "25-34"    
          4 3 5 5 5 4 3 4 2 2 3 "Outstanding"   "Master's"                             "25-34"    
          2 5 4 3 4 4 2 4 2 2 2 "Outstanding"   "Bachelor's"                           "55-60"    
          2 4 2 5 4 4 2 4 2 1 2 "Outstanding"   "PhD"                                  "35-44"    
          5 4 4 5 4 5 5 3 4 4 4 "Very Good"     "PhD"                                  "35-44"    
          5 5 4 5 5 4 5 2 5 4 4 "Very Good"     "PhD"                                  "35-44"    
          4 4 2 2 3 4 4 4 2 2 2 "Outstanding"   "Bachelor's"                           "35-44"    
          3 4 3 3 2 4 2 5 2 2 2 "Outstanding"   "PhD"                                  "35-44"    
          5 5 5 3 4 5 5 5 5 2 5 "Outstanding"   "PhD"                                  "45-54"    
          1 5 5 4 5 4 4 5 3 3 3 "Outstanding"   "Bachelor's"                           "25-34"    
          4 2 2 4 4 5 2 5 1 1 2 "Very Good"     "Bachelor's"                           "25-34"    
          1 4 3 5 4 4 4 5 2 4 3 "Outstanding"   "Master's"                             "35-44"    
          2 5 4 5 5 3 3 4 2 2 2 "Very Good"     "Master's"                             "35-44"    
          4 4 4 4 4 4 5 4 4 4 4 "Above Average" "Master's"                             "25-34"    
          3 5 4 5 5 5 5 4 2 1 3 "Outstanding"   "Master's"                             "35-44"    
          2 4 3 5 3 4 3 4 3 1 3 "Outstanding"   "Master's"                             "35-44"    
          4 3 4 4 4 4 3 4 4 2 4 "Outstanding"   "Master's"                             "25-34"    
          4 5 4 5 4 4 2 4 4 1 4 "Outstanding"   "PhD"                                  "35-44"    
          5 5 5 5 5 4 4 2 4 2 4 "Outstanding"   "Master's"                             "فوق 60"
          5 5 1 1 1 5 5 5 1 1 1 "Outstanding"   "Bachelor's"                           "35-44"    
          4 3 3 3 4 4 3 4 4 4 3 "Outstanding"   "Bachelor's"                           "35-44"    
          2 5 5 5 5 4 2 2 4 2 4 "Outstanding"   "Master's"                             "45-54"    
          4 4 3 5 5 4 4 4 4 3 3 "Outstanding"   "Master's"                             "25-34"    
          4 2 4 5 5 3 3 4 2 4 2 "Outstanding"   "Bachelor's"                           "35-44"    
          5 3 4 5 5 2 2 2 2 4 4 "Outstanding"   "Master's"                             "55-60"    
          4 2 4 5 4 5 2 5 2 2 2 "Outstanding"   "Master's"                             "35-44"    
          4 4 5 5 5 5 5 5 4 2 3 "Very Good"     "Bachelor's"                           "35-44"    
          2 4 5 5 5 4 2 5 4 3 4 "Outstanding"   "Bachelor's"                           "35-44"    
          4 5 5 5 5 4 5 2 4 4 4 "Very Good"     "PhD"                                  "45-54"    
          5 5 5 5 5 4 2 4 5 3 4 "Outstanding"   "Bachelor's"                           "35-44"    
          5 5 5 5 3 2 4 4 4 4 3 "Outstanding"   "Bachelor's"                           "45-54"    
          5 5 1 2 5 5 5 2 5 5 5 "Outstanding"   "Secondary School / Technical Diploma" "فوق 60"
          1 5 3 3 2 5 2 4 2 3 2 "Above Average" "Master's"                             "25-34"    
          2 5 5 4 2 4 4 5 2 2 2 "Outstanding"   "Master's"                             "35-44"    
          4 4 4 5 5 4 3 2 4 3 4 "Very Good"     "PhD"                                  "45-54"    
          5 5 5 5 4 5 5 5 5 5 5 "Outstanding"   "PhD"                                  "35-44"    
          4 3 3 3 4 5 5 4 3 2 3 "Very Good"     "PhD"                                  "25-34"    
          4 5 4 2 4 4 2 2 1 1 4 "Very Good"     "Bachelor's"                           "35-44"    
          3 5 5 4 2 5 4 4 4 2 4 "Outstanding"   "Master's"                             "55-60"    
          3 5 4 3 5 5 5 5 4 1 4 "Very Good"     "PhD"                                  "35-44"    
          2 3 3 5 5 3 5 2 2 1 3 "Very Good"     "Bachelor's"                           "35-44"    
          2 1 3 2 4 4 4 4 2 1 4 "Very Good"     "Bachelor's"                           "25-34"    
          4 5 4 2 4 2 3 2 4 3 4 "Very Good"     "Bachelor's"                           "35-44"    
          2 5 4 5 5 4 4 4 2 1 2 "Very Good"     "Bachelor's"                           "35-44"    
          5 4 5 5 5 5 5 2 5 5 5 "Above Average" "Bachelor's"                           "25-34"    
          5 5 5 5 5 4 5 2 5 5 5 "Outstanding"   "Bachelor's"                           "35-44"    
          4 3 3 1 4 3 4 3 4 2 3 "Very Good"     "Bachelor's"                           "35-44"    
          5 4 4 4 4 4 2 2 3 2 3 "Above Average" "Bachelor's"                           "35-44"    
          4 5 4 1 4 3 5 3 4 2 2 "Very Good"     "Bachelor's"                           "25-34"    
          4 5 5 5 5 5 5 5 3 2 4 "Outstanding"   "Master's"                             "35-44"    
          4 5 5 4 5 5 5 4 4 3 4 "Very Good"     "Bachelor's"                           "35-44"    
          3 4 4 4 4 5 5 5 2 2 3 "Very Good"     "Bachelor's"                           "25-34"    
          4 5 4 5 4 4 5 4 4 3 3 "Outstanding"   "Bachelor's"                           "25-34"    
          2 4 4 4 4 4 4 4 4 4 4 "Outstanding"   "Bachelor's"                           "35-44"    
          4 5 4 4 5 5 5 5 4 2 2 "Very Good"     "Bachelor's"                           "25-34"    
          5 5 5 4 5 4 5 4 3 2 2 "Very Good"     "Bachelor's"                           "35-44"    
          4 4 3 4 4 3 4 3 3 4 4 "Very Good"     "Bachelor's"                           "25-34"    
          2 2 3 5 5 4 4 4 5 4 4 "Outstanding"   "Bachelor's"                           "25-34"    
          4 4 4 4 4 4 4 3 4 4 4 "Very Good"     "Bachelor's"                           "25-34"    
          4 5 2 4 4 4 4 2 4 2 4 "Outstanding"   "Bachelor's"                           "35-44"    
          5 5 5 5 5 3 3 2 4 3 4 "Outstanding"   "Bachelor's"                           "35-44"    
          4 4 4 3 5 4 4 4 5 5 5 "Very Good"     "Master's"                             "25-34"    
          5 5 5 5 5 5 5 4 5 3 4 "Above Average" "Master's"                             "45-54"    
          5 5 5 5 5 5 5 4 4 3 5 "Outstanding"   "Secondary School / Technical Diploma" "35-44"    
          1 1 1 1 5 1 1 1 4 1 4 "Outstanding"   "Bachelor's"                           "35-44"    
          3 4 2 5 3 5 5 4 3 4 2 "Very Good"     "Bachelor's"                           "25-34"    
          2 4 3 1 4 5 4 5 4 3 3 "Very Good"     "Bachelor's"                           "25-34"    
          5 5 5 5 5 5 5 2 5 3 5 "Outstanding"   "Bachelor's"                           "35-44"    
          5 4 4 5 5 3 5 3 5 4 5 "Outstanding"   "Bachelor's"                           "35-44"    
          5 4 5 4 5 5 5 5 5 2 5 "Outstanding"   "Master's"                             "25-34"    
          3 4 5 4 4 4 4 4 2 2 4 "Outstanding"   "Bachelor's"                           "35-44"    
          5 4 5 5 5 3 5 4 2 1 2 "Outstanding"   "Master's"                             "35-44"    
          3 4 3 5 3 3 5 3 2 1 3 "Outstanding"   "Master's"                             "45-54"    
          3 3 4 4 4 4 3 5 4 3 4 "Outstanding"   "Bachelor's"                           "35-44"    
          3 2 2 4 5 3 2 4 3 2 2 "Outstanding"   "Master's"                             "35-44"    
          4 4 4 5 4 2 4 2 4 4 4 "Outstanding"   "Master's"                             "55-60"    
          4 5 5 5 3 4 4 2 3 1 4 "Outstanding"   "Master's"                             "45-54"    
          5 5 5 5 5 4 5 2 3 5 4 "Above Average" "Bachelor's"                           "35-44"    
          5 3 4 3 2 4 2 4 3 4 4 "Very Good"     "Bachelor's"                           "35-44"    
          3 3 4 3 5 4 2 4 3 3 4 "Very Good"     "Bachelor's"                           "25-34"    
          4 4 3 4 4 3 2 4 4 3 3 "Outstanding"   "Master's"                             "45-54"    
          3 5 5 5 5 3 2 4 5 5 3 "Outstanding"   "Bachelor's"                           "55-60"    
          5 4 4 4 5 5 5 5 3 2 5 "Outstanding"   "Bachelor's"                           "25-34"    
          5 4 4 5 5 5 5 4 5 4 3 "Very Good"     "PhD"                                  "45-54"    
          4 4 3 1 4 3 4 3 4 2 3 "Very Good"     "Master's"                             "35-44"    
          4 4 4 5 5 4 4 4 4 3 4 "Very Good"     "Bachelor's"                           "45-54"    
          end

          Comment


          • #6
            I have a variable for Public Service Motivation (8 Likert Items), Extrinsic Motivation (5 Likert Items and 1 categorical). Single likert items representing Satisfaction, Motivation and Pay Satisfaction
            OK. This doesn't seem to quite match up with the example data you show. I would guess that the psm1-psm5 variables are about Public Service Motivation, but there are only 5 not 8. Perhaps you were just abbreviating the example to fit line length limts? I'll similarly assume that er1-er3 are the first e of the 5 extrinsic motivation variables.

            In order to measure correlations, I merged the mutiple items that feeds into each variable using egen rowmean (Is that correct?).
            Basically, yes, but with some reservations. In your example data, there are no missing values. In all work I have done with real-world survey data there are always some non-responses. If, say, among the 8 public service motivation items, somebody answered only 2 of them, would you really want to use the mean of just those 2 items? Usually one sets a minimum number of valid responses and then accepts the mean only if there are at least that many. My other reservation arises from:
            some items are reversed and in that case they are coded in reverse (for Example, Strongly Agree=1 this time).
            The handling of this depends upon the semantics of the item. Let's say that this is one of the 8 public service motivation items. If the other 7 are scored with Strongly Agree = 5, and if the meanings of the stems of those items are such that agreement indicates high public service motivation, then there are two possibilities. If the meaning of the stem for this reverse-scored items is such that agreement is, like with the other items, indicative of high public service motivation, then you should first undo the reverse scoring of this response set (replace the response by 6 minus the response) before including in the row mean. If, however, the meaning of the stem for this reverse scored item is such that agreement is indicative of low public service motivation, then directly incorporating the response as is in the row mean is appropriate. The key thing is you want to be taking the means of numbers where the overall meaning of those numbers in terms of the variable is the same.

            I tried using pairwise correlations and spearman correlation. Both worked but I am not sure if they are as good as pearson's that is why i am asking if I can still use pearson's with the same data.
            If by pairwise correlations you mean Stata's -pwcorr- command, those are Pearson correlations. The difference between -pwcorr- and -corr- is not in the type of correlation coefficient calculated, but in the handling of missing values. When you use -corr varlist-, any observation that has a missing value for any variable mentioned in the varlist is excluded from the calculation of all the correlations. By contrast, in -pwcorr varlist-, observations are only omitted from correlations involving a variable that has a missing value in that observation. But both commands calculate Pearson correlations.

            The legitimacy of using Pearson correlations with this kind of data is a matter of some debate. Strictly speaking, Likert responses are ordinal data, not interval data. But many researchers happily treat them as interval-level data and use them freely in Pearson correlations, regressions, and the like. Some people take an intermediate position that they will treat them as interval only in those situations where the designated response labels correspond to values that are "equally spaced," which, in effect, turns the data into interval-level quality. I'm not sure how one is supposed to decide when the response labels are equally spaced, or even what that means, or even if it is meaningful at all. In my own area, we are pretty liberal about treating Likert scale data as interval level, with all the statistical latitude that gives us. But you should check what the conventions in your discipline are if you plan to publish.

            With the variable having response categories "Above Average," "Outstanding," and "Very Good" one might be more cautious. Again, there are those who would not hesitate to assign numerical values to these, as you have done, and analyze them as interval-level data. But here I think it makes sense to look more critically at the plausibility of doing that. For example, it isn't obvious to me whether "Above Average" is better or worse than "Very Good." In fact, the two don't even same to belong in the same scale: "Above Average" is relative to the overall performance distribution, whereas "Very Good" seems to be an absolute measurement of performance quality. So this variable bothers me, and I think it would bother many people. It's not even clear that there is an unambiguous ordinal response scale here.

            Comment


            • #7
              Clyde Schechter This is extremely helpful and insightful. I have much better understanding now. Thank you very much. The performance measurement scale feels off because it is translated from Arabic but your point makes perfect sense, I will treat this variable differently.

              Comment


              • #8
                Clyde Schechter Using the same dataset, how can I compare between Public Service Motivation and Extrinsic Motivation? Just by performing a t-test between their means? Also, is there a way to measure for example the mediating effect of Paysatisfaction between PSM and overall motivation?

                Comment


                • #9
                  how can I compare between Public Service Motivation and Extrinsic Motivation?
                  Well, before you think about tests comparing the measures you have, you need to be satisfied that the measures are actually comparable. That is, if a person has the same score on these two measures, does that actually mean that they have equal levels of public service motivation and extrinsic motivation? If the two constructs had the same number of items, and if the stems of the items were the same with the substitution of the words "Public Service" for "Extrinsic", then you can be reasonably comfortable the measures are comparable. But if there is not a strong correspondence between the content of the questions like that, then you really have no basis for using the measurements in that way. Once you are satisfied that they are comparable, a paired t-test to do the comparison would be reasonable.

                  Also, is there a way to measure for example the mediating effect of Paysatisfaction between PSM and overall motivation?
                  Mediation is a complicated and controversial area in statistics. One approach, the one I use, to this would be to do structural equations modeling, something like this:
                  Code:
                  sem (generalmotivation <- paysatisfaction publicservicemotivation) (paysatisfaction <- publicservicemotivation)
                  estat teffects
                  But there are other approaches, such as just regression generalmotivation on the pair of variables, and then on publicservicemotivation alone and seeing how much the coefficient of paysatisfaction changes between the two regressions. And there are some statisticians who hold that mediation analysis simply cannot be done on observational data. So I think you should check the literature in your field to see what approach seems to be most accepted.

                  Comment


                  • #10
                    The two scales do not include the same number of questions but there are three out of the 5 questions measuring extrinsic motivation that clearly ask the respondent whether she/he would choose an extrinsic reward over a PSM-related reward, and if the respondent agrees that feeds into his/her levels of extrinsic motivation so I thought this would make up for extrinsic scale having less questions. On one hand, i feel this kind of questions will fish out the realistic levels of extrinsic motivation. On the other, i am now worried that this might have unintentionally pushed people to choose altruistic motives for self-confirmation purposes because when i used one categorical question where I also gave them a list of extrinsic and PSM related aspects of a job, and the majority picked the jobs that had extrinsic ones over all the other factors. That contradicts that the mean for extrinsic motivation came out less than that of the PSM. So i am not sure whether to drop the questions that had comparisons integrated into it or not.
                    Last edited by Salma Aboelmaaty; 29 Jul 2022, 10:33.

                    Comment


                    • #11
                      This does seem very problematic. It does seem that the two different approaches to extrinsic motivation assessment produce contradictory results, probably for the reasons you mention. The problem is clear, but the solution, to me at least, is not. I would consult with somebody with experience in measuring motivation, who speaks the language of the survey (Arabic, I assume), and understands the local culture, to see what can be salvaged from your measures.
                      Last edited by Clyde Schechter; 29 Jul 2022, 11:01.

                      Comment

                      Working...
                      X