Announcement

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

  • Changing the values of a likert-scale

    I'm currently writing my thesis and I want to change the values of the Likert-scale. I want 0 never, 1 almost never, and sometimes all to get the value of 0 so those three become 1. For the value 3 often I want it to have the value of 1, for the value 4 I want this to become 2, and for 5 it needs to get the value of 3. How do I do this.
    Thanks in advance.

    Anna


    . codebook c016a

    --------------------------------------------------------------------------------------------------
    c016a Saya takut menjadi gemuk
    --------------------------------------------------------------------------------------------------

    Type: Numeric (byte)
    Label: d01lab2

    Range: [0,5] Units: 1
    Unique values: 6 Missing .: 67/581

    Tabulation: Freq. Numeric Label
    321 0 Never
    64 1 Almost never
    52 2 Sometimes
    49 3 Often
    13 4 Very often
    15 5 Almost always
    67 .

  • #2
    Code:
    recode c016a (0/2 = 0) (3 = 1) (4 = 2) (5 = 3), gen(c016a_rec)
    Another way, a bit less transparent, is
    Code:
    gen c016a_rec = max(0, c016a-2)
    In the future, when showing data examples, please use the -dataex- command to do so. If you are running version 18, 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.

    Comment


    • #3
      Hi Clyde,
      Thank you so much for your answer.
      Best,
      Anna

      Comment

      Working...
      X