Regression factor (source code)

= Regression factor

= Categorical predictor
{synonym}

A <regression factor> is a <categorical variable> encoded by indicator columns or <treatment contrasts> in a <statistical model>. A factor with $k$ observed levels normally contributes $k-1$ <statistical degrees of freedom> when an intercept is present. The <reference level in a regression factor> has coefficient zero under <treatment contrasts>. Coding a year as a factor permits arbitrary year effects rather than imposing a linear trend.