0
$\begingroup$

I'm confused about which predictor gets the "-1" or the "1" when using contrast codes and not dummy codes for recoding variables. For example, I prepared the following contrast codes by following my textbook but I don't understand why I'm doing it this way:

Y variable: time spent at job X variable: type of assessment method: (1) interview, I (2) competency, C (3) written, W

Q. The researcher wants to know if written (W) result in different time spent at a job from applicants assessed with interviews (I) or competency (C). She also wants to determine if there is a difference in time spent at job between interview (I) and competency (C).

My answer (based on textbook):

  1. New variable 1: I --> +1, C --> +1, W --> -2
  2. New variable 2: I --> +1, C --> -1, W --> 0

(Because I am comparing comparing the written to interviews or competency and I am also comparing interviews and competency. In addition, this would make my new variables orthogonal since they all add up to 0). Is this the proper way to think about this?

$\endgroup$
5
  • 3
    $\begingroup$ Possible duplicate of Dummy Coding for Regression? $\endgroup$
    – T.E.G.
    Commented Nov 6, 2016 at 4:21
  • $\begingroup$ If you do not understand the answers you got last time then add comments there, not ask the same question again. $\endgroup$
    – mdewey
    Commented Nov 6, 2016 at 12:08
  • $\begingroup$ This question is about contrast coding and the other one is about dummy coding so I thought I had to separate it. Apologies for the confusion. I'll refrain from doing so in future! $\endgroup$ Commented Nov 6, 2016 at 18:43
  • $\begingroup$ The linked thread is about reference level coding, whereas this is about effect (?) coding (I think). At any rate, these don't seem to be duplicates. $\endgroup$ Commented Nov 6, 2016 at 23:01
  • $\begingroup$ Sunmi, you might want also to read this answer which explains how your hypothesis (which groups to compare) guides you to create contrast coefficients which in turn define contrast codes to use in regression. $\endgroup$
    – ttnphns
    Commented Nov 7, 2016 at 8:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.