In our book, we discuss the important question of how to assign different parameterizations to categorical variables when fitting models (section 3.1.3). We show code in R for use in the lm() function, as follows:lm(y ~ x, contrasts=list(x,”contr.trea…
Tag: contrasts
Example 8.9: Contrasts
In example 8.6 we showed how to change the reference category. This is the natural first thought analysts have when their primary comparisons aren’t represented in the default output. But our interest might center on a number of comparisons which don…