Indicator Variables
Encoding Categories with Indicator Variables
Turn membership into a predictor
An indicator variable takes value one for membership in a stated category and zero otherwise. In a linear regression, its coefficient compares that category with a reference category while holding the other included predictors fixed. The intercept is the prediction for the reference combination when any continuous predictors are at their coded zero.
Choose a reference deliberately
For a categorical predictor with k levels and an intercept, use k minus one indicators. The omitted level is the reference.
Including an intercept and one indicator for every level creates exact linear dependence: each row's indicators sum to one, so the coefficients are not uniquely identified. Changing the reference changes coefficient labels but not fitted values.
Interpret a coefficient as a conditional contrast
With no interaction term, an indicator coefficient is an additive difference from the reference at the same values of the other covariates. It is not automatically a causal effect, and it is not a statement about every individual. Its interpretation relies on model specification, coding, and the conditional comparison actually represented by the data.
Separate coding from interaction
Indicators encode categories. If a category is expected to change the slope of another predictor, add the appropriate product term and interpret the resulting simple slopes. That extension is an interaction-model question; the basic indicator structure still establishes the reference group and contrasts.
A categorical predictor has four mutually exclusive program types, and a linear regression includes an intercept. How many indicator variables are ordinarily included to represent program type?
In a regression with an intercept and three indicators for four treatment groups, what does the intercept represent if all continuous covariates are coded as zero?