Skip to main content

Dummy Variables and Analysis of Covariance

So far we have mostly seen quantitative variables in regression models, but many variables of interest are qualitative (sex, status, etc). To add such information to a model, we can set up a indicator/dummy variable. For example, we could set up a variable Xi1 representing sex as 0 for male and 1 for female for the ith individual.

Models with Interaction

If we have a first-order regression model with an interaction we can represent it with an interaction term:

image-1664490098266.png

We can illustrate interaction as follows:

image-1664490347740.png
Beta2 indicates how much greater (smaller) the Y intercept for the class coded 1 than that of the class coded 0
Beta3 indicates how much greater (smaller) the slope for the class coded 1 then that of the class coded 0

Raw Mean

A raw mean is simply an average of the observations without considering other covariates. Least square means (sometimes called adjusted mean) are adjusted for other covariates, since it is estimated from a linear regression.