introduction to the general linear model glm n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Introduction to the General Linear Model (GLM) PowerPoint Presentation
Download Presentation
Introduction to the General Linear Model (GLM)

Loading in 2 Seconds...

play fullscreen
1 / 34

Introduction to the General Linear Model (GLM) - PowerPoint PPT Presentation


  • 56 Views
  • Uploaded on

Introduction to the General Linear Model (GLM). 1 quantitative variable & 1 2-group variable 1a  main effects model with no interaction 1b  interaction model 1 quantitative variable & 1 3-group variable 2a  main effects model with no interaction 2b  interaction model.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Introduction to the General Linear Model (GLM)' - ayita


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction to the general linear model glm

Introduction to the General Linear Model (GLM)

  • 1 quantitative variable & 1 2-group variable
      • 1a  main effects model with no interaction
      • 1b  interaction model
  • 1 quantitative variable & 1 3-group variable
      • 2a  main effects model with no interaction
      • 2b  interaction model
slide2

There are two important variations of each of these models

  • Main effects model
    • Centered or coded terms for each variable
    • No interaction – assumes regression slope homogeneity
    • b-weights for binary & quant variables each represent main effect of that variable
  • 2. Interaction model
    • Centered or coded terms for each variable
    • Term for interaction - does not assume reg slp homogen !!
    • b-weights for binary & quant variables each represent the simple effect of that variable when the other variable = 0
    • b-weight for the interaction term represented how the simple effect of one variable changes with changes in the value of the other variable (e.g., the extent and direction of the interaction)
slide3
#1a  centered quant variable & dummy coded 2-grp variable

y’ = b0+ b1x+ b2z

“X” is a centered quantitative variable

X  X – Xmean

“Z” is a dummy-coded 2-group variable (Cz = 0 & Tx = 1)

Z Tz = 1 Cz = 0

slide4
#1a  centered quant variable & dummy coded 2-grp variable

y’ = b0+ b1x+ b2z

  • b0 mean of those in Cz with X=0 (mean)
  • b1 slope of Y-X regression line for Cz (=0)
  • - slope same for both groups  no interaction
  • b2  group difference for X=mean (=0)
  • - group different same for all values of X  no interaction
slide5

#1a quantitative (Xcen) & 2-group (Tz=1 Cz=0)

y’ = b0 + b1X + b2Z

20

5

10

b0 = ht of Cz line

b1 = slp of Cz line

0 10 20 30 40 50 60

b2 = htdif Cz & Tz

Tz

Z-lines have same slp

(no interaction)

Cz

-2 -1 0 1 2  Xcen

slide6
#1b  centered quant var, dummy coded 2-group var

& their product term/interaction

y’ = b0+ b1x+ b2z+ b3xz

“X” is a centered quantitative variable

X  X – Xmean

“Z” is a dummy-coded 2-group variable

Z Tz = 1 Cz = 0

“XZ” represents the interaction of “X” and “Z”

XZX*Z

slide7
#1b  centered quant var, dummy coded 2-group var

& their product term/interaction

y’ = b0+ b1x+ b2z+ b3xz

  • b0 mean of those in Cz with X= 0 (mean)
  • b1 slope of Y-X regression line for Cz (=0)*
  • b2  group difference for X=0 (mean)*
  • b3  how slope of y-x reg line for Tz (=1) differs from slope of y-x reg line for Cz (=0)
  • * Because the interaction is included, slopes may be different for different grps
  • * Because the interaction is included, group differences may be different for different X values
slide8

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

30

15

15

-5

b0 = ht of Cz line

Tz

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

Cz

-2 -1 0 1 2  Xcen

slide9

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

-2 -1 0 1 2  Xcen

slide10

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

-2 -1 0 1 2  Xcen

slide11

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

-2 -1 0 1 2  Xcen

slide12

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

-2 -1 0 1 2  Xcen

slide13

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

-2 -1 0 1 2  Xcen

slide14

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

-2 -1 0 1 2  Xcen

slide15

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

-2 -1 0 1 2  Xcen

slide16

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

-2 -1 0 1 2  Xcen

slide17

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

-2 -1 0 1 2  Xcen

slide18

#1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction

y’ = b0 + b1X + b2Z + b3XZ

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz

0 10 20 30 40 50 60

b3 = slpdif Cz & Tz

-2 -1 0 1 2  Xcen

slide19
#2a  centered quant var & dummy coded 3-grp var

y’ = b0+ b1x+ b2z1+ b3z2

“X” is centered quantitative variable

X  X – Xmean

“Z1” & “Z2” are dummy-codes for the 3-group variable

Z1 Tz1 = 1 Tz2 = 0 Cz = 0

Z2  Tz1 = 0 Tz2 = 1 Cz = 0

slide20
#2a  centered quant var & dummy coded 3-grp var

y’ = b0+ b1x+ b2z1+ b3z2

  • b0 mean of those in Cz with X=0 (mean)
  • b1 slope of Y-X regression line for Cz (=0)
  • - slope same for all groups  no interaction
  • b2  Tz1 - Cz difference for X=mean (=0)
  • - group different same for all values of X  no interaction
  • b3  Tz2 - Cz difference for X=mean (=0)
  • - group different same for all values of X  no interaction
slide21

#2a quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0

y’ = b0 + b1X+ b2Z1 + b3Z2

35

5

5

-15

b0 = ht of Cz line

Tz2

b1 = slp of Cz line

Cz

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

Tz1

b3 = htdif Cz & Tz2

Z-lines have same slp

(no interaction)

-2 -1 0 1 2  X

slide22
#2b  centered quant var, dummy coded 3-group var

& their product terms/interaction

y’ = b0+ b1x+ b2z1+ b3z2+ b4xz1+ b5xz2

“X” is centered quantitative variable

X  X – Xmean

“Z1” & “Z2” are dummy-codes for the 3-group variable

Z1 Tz1 = 1 Tz2 = 0 Cz = 0

Z2  Tz1 = 0 Tz2 = 1 Cz = 0

“XZ1” & “XZ2” represent the interaction of “X” and “Z”

XZ1X*Z1

XZ2X*Z2

slide23
#2b  centered quant var, dummy coded 3-group var

& their product terms/interaction

y’ = b0+ b1x+ b2z1+ b3z2+ b4xz1+ b5xz2

  • b0 mean of those in Cz with X= 0 (mean)
  • b1 slope of Y-X regression line for Cz
  • b2  Tz1 - Cz difference for X=0 (mean)*
  • b3  Tz2 - Cz difference for X=0 (mean)*
  • b4  how slope of y-x reg line for Tz1 differs from slope of y-x reg line for Cz *
  • b4  how slope of y-x reg line for Tz2 differs from slope of y-x reg line for Cz *
  • *Because the interaction is included, group differences may be different for different X values
  • * Because the interaction is included, slopes may be different for different grps
slide24

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

-8

2

5

30

15

5

b0 = ht of Cz line

b1 = slp of Cz line

Tx2

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

Tx1

b3 = htdif Cz & Tz2

Cx

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen

slide25

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

b3 = htdif Cz & Tz2

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen

slide26

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

b3 = htdif Cz & Tz2

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen

slide27

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

b3 = htdif Cz & Tz2

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen

slide28

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

b3 = htdif Cz & Tz2

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen

slide29

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

b3 = htdif Cz & Tz2

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen

slide30

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

b3 = htdif Cz & Tz2

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen

slide31

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

b3 = htdif Cz & Tz2

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen

slide32

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

b3 = htdif Cz & Tz2

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen

slide33

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

b3 = htdif Cz & Tz2

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen

slide34

#2b quantitative (Xcen) & 3-group Z1 Tz1 = 1 Tz2 = 0 Cz = 0

    • Z2  Tz1=0 Tz2 = 1 Cz = 0
  • and interactions XZ1 = X*Z1 XZ2 = X*Z2

y’ = b0 + b1Xcen + b2Z1 + b3Z2 + b4XZ1 + b5XZ2

b0 = ht of Cz line

b1 = slp of Cz line

b2 = htdif Cz & Tz1

0 10 20 30 40 50 60

b4 = slpdif Cz & Tz1

b3 = htdif Cz & Tz2

b5 = slpdif Cz & Tz2

-2 -1 0 1 2  Xcen