+ Reply to Thread
Results 1 to 2 of 2

Thread: Help with creating a dummy variable with a categorical variable.

  1. #1
    Points: 6, Level: 1
    Level completed: 11%, Points required for next Level: 44

    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with creating a dummy variable with a categorical variable.




    I am very new to stats and this is not my thing. I need help in a class with creating dummy variables for the variable "education level". Im not sure what values to insert for old and new values because I keep getting an error. Also how many dummy variables do I make? I attached the data set. My dependent variable is imprisonment rate.

    Thank you.

  2. #2
    TS Contributor
    Points: 17,779, Level: 84
    Level completed: 86%, Points required for next Level: 71
    Karabiner's Avatar
    Location
    FC Schalke 04, Germany
    Posts
    2,542
    Thanks
    56
    Thanked 640 Times in 602 Posts

    Re: Help with creating a dummy variable with a categorical variable.


    If you have k educational levels you need to create
    k-1 dummy variables. One educational level ("reference
    level") won't have a dummy variable of its own. If
    e.g. you chose "no education" as reference level, then
    you create one dummy for each of the remaining
    levels. How you do that depends on your software,
    the logic is something like
    if education_variable = 1, then edu_dummy_1 = 1
    if education_variable is not = 1, then edu_dummy_1 = 0

    if education_variable = 2, then edu_dummy_2 = 1
    if education_variable is not = 1, then edu_dummy_2 = 0

    HTH

    P.

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats