# Linear model with a categorical variable with multiple levels

Basic regression model question.

Suppose I treated 3 groups of mice, group 1 with water, group 2 with drug A, and group 3 with drug B. The water treatment thus serves as baseline.

Now my question is what is a more appropriate linear model to use in order to assess the effect of each drug relative to the water treatment:

1. Do 2 pairwise comparisons: A vs. water and B vs. water?

2. Use a linear model: response ~ treatment, where the levels in treatment are: water, A, and B with dummy coding.

I'd sort of use a mix of the two options you have suggested. I'd fit the linear model response ~ treatment where treatment is at three levels. (note that if you are working in R then dummy coding is automated). Since you have a specific hypothesis in mind, I would also set a priori contrasts on the linear model to test whether water = a and water = b. Again, if you are working in R then setting contrasts like this is fairly straightforward.