General Linear Model (GLM)

Mario E. Bermonti-PΓ©rez, MA, PhD

Objectives

  • Understand the basic concepts of the GLM
  • Understand the usefulness of the GLM
  • Understand how the GLM underlies most stats methods
  • Understand the basic process of applying the GLM

GLM basics

Form

Examples

  • Attention -> WM
  • Art -> Sustained attention
  • ADHD -> Innatention
  • Celiac disease -> Processing speed
  • Intervention -> Selective attention
  • Musical training -> EF

Form

  • π‘‚π‘’π‘‘π‘π‘œπ‘šπ‘’ = (π‘ƒπ‘Ÿπ‘’π‘‘π‘–π‘π‘‘π‘œπ‘Ÿ)

  • π‘‚π‘’π‘‘π‘π‘œπ‘šπ‘’ = (π‘ƒπ‘Ÿπ‘’π‘‘π‘–π‘π‘‘π‘œπ‘Ÿ) + error

  • Y =(𝛽) + πœ€

  • Y = (𝛽0 + 𝛽1) + πœ€

  • Y = (𝛽0 + 𝛽1 + 𝛽2) + πœ€

Study effects

  • Relationship
  • Difference between groups

Usefulness

  • Existence: statistical significance
  • Size: effect size, parameter

GLM with different variables

Lets see the variables

Phonological loop span

Ready?

8

4

0

3

7

1

2

Numbers?

Selective attention

Ready?

Go

Back to GLM with different variables

First, there were data

Differences between 2 groups?

Process

Group by attentional level

Estimate mean

Estimate relationship (difference)

GLM form

GLM analysis


Call:
lm(formula = wm_span ~ group, data = data_2_groups)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.7176 -0.8008  0.1270  0.6442  2.3197 

Coefficients:
                      Estimate Std. Error t value Pr(>|t|)    
(Intercept)            3.98899    0.09836   40.55   <2e-16 ***
groupnormal attention  4.87359    0.13910   35.03   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.9836 on 198 degrees of freedom
Multiple R-squared:  0.8611,    Adjusted R-squared:  0.8604 
F-statistic:  1227 on 1 and 198 DF,  p-value: < 2.2e-16

A step further…

Differences between 4 groups

Process

Group by attentional level

Estimate mean

Estimate relationship (difference)

GLM form

GLM form 2 vs 4 groups

GLM analysis


Call:
lm(formula = wm_span ~ group, data = data_4_groups)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.5487 -0.6404 -0.0847  0.6211  2.7641 

Coefficients:
                            Estimate Std. Error t value Pr(>|t|)    
(Intercept)                  2.98500    0.09691   30.80   <2e-16 ***
groupmild attention deficit  2.00399    0.13705   14.62   <2e-16 ***
groupnormal attention        4.05804    0.13705   29.61   <2e-16 ***
groupsuperior attention      8.16936    0.13705   59.61   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.9691 on 396 degrees of freedom
Multiple R-squared:  0.9077,    Adjusted R-squared:  0.907 
F-statistic:  1299 on 3 and 396 DF,  p-value: < 2.2e-16

A step further…

Numeric predictors

Attention and WM

Estimate relationship

Estimate relationship line

GLM form

GLM analysis


Call:
lm(formula = wm ~ attention, data = data_cont_vars)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.5767 -1.0112  0.1610  0.8468  4.2660 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   1.8842     0.6609   2.851  0.00532 ** 
attention     0.1259     0.0165   7.631 1.54e-11 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 1.523 on 98 degrees of freedom
Multiple R-squared:  0.3727,    Adjusted R-squared:  0.3663 
F-statistic: 58.24 on 1 and 98 DF,  p-value: 1.539e-11

Summary of models

Closing

Conclusions

  • GLM underlies most stats methods
  • Simple but powerful idea
  • Use variables to predict variables
  • Effects = relationships, differences

Questions or Comments

Further resources

  • Andy Field Lectures - YouTube

  • Field, A. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage Publications. Chapter 2.

Bonus

  • Always GLM

GLM subtypes