# How do you make dummies for collinear categorical variables?

Suppose I have the following relationship

$$y = A + B + \epsilon$$

where $$A$$ is a categorical variable with $$2$$ levels and $$B$$ is categorical with $$3$$ levels. However when $$A = 1$$, $$B=1$$, always. How do I set up the dummies to fit a linear regression model?

• This sounds like a case of measuring the same quantity twice but in different ways, something akin to measuring a distance in feet and then in meters.
– Dave
Jul 15 at 20:02
• In R, you can fit this model with lm(y ~ A + B - 1, X), assuming the data frame X has variables named "A", "B", and "y". The point is that your condition is not collinearity.