Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
Review
. 2015 Jul;54(7):1141-4.
doi: 10.1093/rheumatology/ket172. Epub 2013 May 16.

Introduction to statistical modelling 2: categorical variables and interactions in linear regression

Affiliations
Review

Introduction to statistical modelling 2: categorical variables and interactions in linear regression

Mark Lunt. Rheumatology (Oxford). 2015 Jul.

Abstract

In the first article in this series we explored the use of linear regression to predict an outcome variable from a number of predictive factors. It assumed that the predictive factors were measured on an interval scale. However, this article shows how categorical variables can also be included in a linear regression model, enabling predictions to be made separately for different groups and allowing for testing the hypothesis that the outcome differs between groups. The use of interaction terms to measure whether the effect of a particular predictor variable differs between groups is also explained. An alternative approach to testing the difference between groups of the effect of a given predictor, which consists of measuring the effect in each group separately and seeing whether the statistical significance differs between the groups, is shown to be misleading.

Keywords: categorical variable; dummy variable; indicator variable; interaction; linear regression.

PubMed Disclaimer

Comment in

Publication types

LinkOut - more resources