General linear models
This page describes linear models, broadly speaking. In particular, we focus on analyses involving more than one explanatory variable. (For General-ized Linear Models see later page on GLMs).
What is a general linear model?
A general linear model is a flexible modeling framework for testing the effects of any combination of categorical and continuous predictor variables on a continuous response measure. The approach includes regression, ANOVA, t-tests and ANCOVA as special cases. The general linear model framework also serves as a starting point for expanding into more complex statistical models.
Assumptions of general linear models
As with other statistical tests, general linear models have certain assumptions that must be satisfied if our inferences are going to be correct.
Interactions
General linear models allow us to test whether the effects of predictors on a response variable are constant or whether these effects depend on the value of some other predictor. Linear models allow for any combination of interactions between categorical and continuous predictors.
For a case study including a hypothesis involving a statistical interaction, see the painted turtle nesting example.
Non-linear relationships
General linear models assume that predictors are related to the response variable in a linear way, but in many cases biological relationships are non-linear. Luckily we can linearise non-linear relationships using transformations, quadratic terms or breakpoints.
Additional Resources
StatsTree General Linear Model Primer
StatsTree General Linear Models in R
StatsTree - Ratios as Response Variables
Whitlock & Schluter - The Analysis of Biological Data
Chapter 18: pages 609-628 [Sapling]
Multiple linear regression in R
Advanced: Code tutorial video for conducting a multiple linear regression in R.
Multiple linear regression
Intermediate: What if you have more than one independent variable? In this video we review the very basics of Multiple Regression.
Analysis of covariance: ANCOVA
Intermediate: Explanation and example of ANCOVA, another test that falls under the umbrella term of “General Linear Models”.
Review Questions
Give three reasons that studies in biology sometimes have more than one explanatory variable. [Credit: Whitlock and Schluter, 2009]
Write an “R formula” for a linear model with two independent variables and one dependent variable- dog breed, brand of dog food, and the dog’s lifespan, respectively-, and include an interaction effect between the two dependent variables.
Which of the following methods could be categorized under “general linear models”?
Binomial test
Goodness-of-fit test
Chi-squared test for independence
t-test
ANOVA
Regression
Multiple linear regression
When an interaction between two (or more) factors is present, what conclusions would you draw about the factors?
The Next Steps
Confused?
Let’s move down the tree and review these concepts.
Ready to Move Forward?
Let’s move up the tree to the next topic.