

Regression is one example of a general linear model. In fact, many of the statistical tests we have learned can be understood as versions of the same general model: we use one or more variables to account for variation in an outcome.
In this section, GLM means general linear model, not generalized linear model. These sound similar, but they refer to different ideas. The general linear model includes many familiar analyses with continuous outcomes, such as regression, t-tests, and ANOVA.
This section is meant to help you see connections across the course. You do not need to run every analysis as a regression, and you do not need to memorize the regression version of each test. The goal is to notice the shared logic behind the tests we have learned.
In the general linear model framework, many analyses can be written as:
[ = + ]
The model represents the part of the outcome we can account for using predictors, group membership, or repeated measurements. The error represents the part of the outcome that remains unexplained by the model.
If you would like to learn more about this idea, Lindeløv’s online book Common statistical tests are linear models provides a more detailed explanation.
For the examples below, we will use the Sample_Dataset_2014 dataset. I am only showing the relevant output so that you can focus on the connections between analyses. The dataset is available here: Sample_Dataset_2014.xlsx.
We will focus on correlation, independent t-tests, dependent t-tests, and one-way ANOVA because these are the easiest to compare with regression.
Imagine we want to examine whether English scores and reading scores are related. We could use a Pearson correlation, as shown in the output at the top of the figure. We could also run a simple linear regression with English scores predicting reading scores, as shown in the output at the bottom of the figure.

There are a few things to notice:
This does not mean correlation and regression are always interchangeable in how we talk about them. Correlation is usually used to describe the strength and direction of a relationship between two variables. Regression is usually used when we want to predict or explain variation in an outcome.
An independent t-test compares two independent groups on a continuous outcome. We can also represent that same comparison using regression if we code group membership as a predictor.
In this example, we examine whether reading scores differ by gender. The independent t-test output is shown at the top of the figure, and the regression output is shown at the bottom.

There are a few things to notice:
This is why a two-group comparison can be represented as a regression model. The categorical group variable is translated into a coded predictor, and the regression coefficient represents the group difference.
A dependent t-test compares two related measurements, such as two scores from the same participant. This can also be represented using the general linear model, although it is not as straightforward to run in base jamovi’s regression menu.
For a dependent t-test, we first create a difference score between the two related measurements. The model then tests whether the average difference score differs from zero.

There are a few things to notice:
This example shows that a dependent t-test is also a model of an outcome: the difference between two related measurements.
A one-way ANOVA compares three or more independent groups on a continuous outcome. It can also be represented as a regression model by coding group membership using comparison variables.
In this example, we examine whether English scores differ by rank. Rank has four levels, so the one-way ANOVA compares English scores across four groups. In the regression output, the group comparisons are represented through coefficients.


There are a few things to notice:
For example, if Rank 1 is the reference group, the intercept represents the mean English score for Rank 1. A coefficient comparing Rank 2 to Rank 1 represents how much the Rank 2 mean differs from the Rank 1 mean. Adding the coefficient to the intercept gives the estimated mean for Rank 2, with small differences possible due to rounding.
This is the same idea we saw with the independent t-test, but extended to more than two groups.
The purpose of this section is not to replace the tests we learned earlier. Instead, the purpose is to show that many familiar tests share a common structure.
| Familiar Test | General Linear Model Version | What the Predictor Represents |
|---|---|---|
| Pearson correlation | Simple linear regression with a standardized coefficient | A continuous predictor |
| Independent t-test | Regression with one two-level categorical predictor | Group membership |
| Dependent t-test | Model of a difference score | Difference between related measurements |
| One-way ANOVA | Regression with one categorical predictor with three or more levels | Group membership across multiple groups |
| Factorial ANOVA | Regression with multiple categorical predictors and interactions | Main effects and interactions |
| ANCOVA | Regression/ANOVA with categorical predictors and continuous covariates | Group membership and statistical adjustment variables |
Across these examples, the statistical question is often some version of: Can we use information from one or more variables to account for variation in an outcome?
The tests differ in the kinds of predictors they use and the kinds of research questions they answer. Correlation focuses on relationships between continuous variables. t-tests and ANOVA focus on group differences. Regression focuses on prediction and explanation. But under the surface, these analyses are closely related.
Match each familiar test to the general linear model idea it represents.
The general linear model is useful because it helps us see the connections among statistical tests. Once you understand the shared model logic, the different tests may feel less like separate procedures and more like variations on the same underlying idea.