0
$\begingroup$

I have a categorical variable with 3 levels: low, mid, and high. I want to do all-pair comparisons with the following contrasts:

lowVSmid = c(1,-1,0)
lowVShigh = c(1,0,-1)
midVShigh = c(0,1,-1)

contrasts(df$var) =    
    cbind(lowVSmid, lowVShigh,midVShigh)

However, when I print the contrast, I only see two:

contrasts(df$var)

         lowVSmid lowVShigh
Low           1         1
Medium       -1         0
High          0        -1

What am I doing wrong?

$\endgroup$