Register today for our Generative AI Foundations course. Use code GenAI99 for a discount price of $99!
Skip to content

Factor

The term “factor” has different meanings in statistics that can be confusing because they conflict.  

In statistical programming languages like R, factor acts as an adjective, used synonymously with categorical – a factor variable is the same thing as a categorical variable.  These factor variables have levels, which are the same thing as categories (a factor variable does not have factors, it has categories). A special, and important, subset of categorical variables is binary (yes-no) variables, also called indicator variables.  Binary variables can reference natural 0/1 categories (buy, no-buy; cure, no-cure), or they can be dummy variables that are created out of multicategory variables, where each category gets its own dummy, indicating whether a record has that category.

In statistical modeling, factor is used synonymously with predictor variable. This is particularly the case when referring to fixed and random effects modeling – factors (variables) are either fixed factors or random factors.