Download presentation
Presentation is loading. Please wait.
1
Introduction to the General Linear Model (GLM) l 1 quantitative variable & 1 2-group variable l 1a main effects model with no interaction l 1b interaction model l 1 quantitative variable & 1 3-group variable l 2a main effects model with no interaction l 2b interaction model
2
There are two important variations of each of these models 1.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)
3
#1a centered quant variable & dummy coded 2-grp variable y’ = b 0 + b 1 x + b 2 z “X” is a centered quantitative variable X X – X mean “Z” is a dummy-coded 2-group variable (Cz = 0 & Tx = 1) Z Tz = 1 Cz = 0
4
#1a centered quant variable & dummy coded 2-grp variable y’ = b 0 + b 1 x + b 2 z b 0 mean of those in Cz with X=0 (mean) b 1 slope of Y-X regression line for Cz (=0) - slope same for both groups no interaction b 2 group difference for X=mean (=0) - group different same for all values of X no interaction
5
0 10 20 30 40 50 60 y’ = b 0 + b 1 X + b 2 Z Cz Tz -2 -1 0 1 2 Xcen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz Z-lines have same slp (no interaction) 20510 #1a quantitative (Xcen) & 2-group (Tz=1 Cz=0)
6
#1b centered quant var, dummy coded 2-group var & their product term/interaction y’ = b 0 + b 1 x + b 2 z + b 3 xz “X” is a centered quantitative variable X X – X mean “Z” is a dummy-coded 2-group variable Z Tz = 1 Cz = 0 “XZ” represents the interaction of “X” and “Z” XZ X * Z
7
#1b centered quant var, dummy coded 2-group var & their product term/interaction y’ = b 0 + b 1 x + b 2 z + b 3 xz b 0 mean of those in Cz with X= 0 (mean) b 1 slope of Y-X regression line for Cz (=0)* b 2 group difference for X=0 (mean)* b 3 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
8
0 10 20 30 40 50 60 Cz Tz -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ 30 -5 15 #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
9
0 10 20 30 40 50 60 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
10
0 10 20 30 40 50 60 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
11
0 10 20 30 40 50 60 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
12
0 10 20 30 40 50 60 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
13
0 10 20 30 40 50 60 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
14
0 10 20 30 40 50 60 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
15
0 10 20 30 40 50 60 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
16
0 10 20 30 40 50 60 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
17
0 10 20 30 40 50 60 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
18
0 10 20 30 40 50 60 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 1 = slp of Cz line b 2 = htdif Cz & Tz b 3 = slpdif Cz & Tz y’ = b 0 + b 1 X + b 2 Z + b 3 XZ #1b quantitative (X) & 2-group (Tz Cz) predictors w/ interaction
19
#2a centered quant var & dummy coded 3-grp var y’ = b 0 + b 1 x + b 2 z 1 + b 3 z 2 “X” is centered quantitative variable X X – X mean “Z 1 ” & “Z 2 ” are dummy-codes for the 3-group variable Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1 = 0 Tz2 = 1 Cz = 0
20
#2a centered quant var & dummy coded 3-grp var y’ = b 0 + b 1 x + b 2 z 1 + b 3 z 2 b 0 mean of those in Cz with X=0 (mean) b 1 slope of Y-X regression line for Cz (=0) - slope same for all groups no interaction b 2 Tz1 - Cz difference for X=mean (=0) - group different same for all values of X no interaction b 3 Tz2 - Cz difference for X=mean (=0) - group different same for all values of X no interaction
21
0 10 20 30 40 50 60 Cz Tz 2 Tz 1 -2 -1 0 1 2 X b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line y’ = b 0 + b 1 X + b 2 Z 1 + b 3 Z 2 Z-lines have same slp (no interaction) 35 -155 5 #2a quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0
22
#2b centered quant var, dummy coded 3-group var & their product terms/interaction y’ = b 0 + b 1 x + b 2 z 1 + b 3 z 2 + b 4 xz 1 + b 5 xz 2 “X” is centered quantitative variable X X – X mean “Z 1 ” & “Z 2 ” are dummy-codes for the 3-group variable Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1 = 0 Tz2 = 1 Cz = 0 “XZ 1 ” & “XZ 2 ” represent the interaction of “X” and “Z” XZ 1 X * Z 1 XZ 2 X * Z 2
23
#2b centered quant var, dummy coded 3-group var & their product terms/interaction y’ = b 0 + b 1 x + b 2 z 1 + b 3 z 2 + b 4 xz 1 + b 5 xz 2 b 0 mean of those in Cz with X= 0 (mean) b 1 slope of Y-X regression line for Cz b 2 Tz1 - Cz difference for X=0 (mean)* b 3 Tz2 - Cz difference for X=0 (mean)* b 4 how slope of y-x reg line for Tz1 differs from slope of y-x reg line for Cz * b 4 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
24
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 Cx Tx1 Tx2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 30 5 15 5 2 -8 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
25
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
26
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
27
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
28
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
29
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
30
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
31
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
32
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
33
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
34
0 10 20 30 40 50 60 y’ = b 0 + b 1 X cen + b 2 Z 1 + b 3 Z 2 + b 4 XZ 1 + b 5 XZ 2 -2 -1 0 1 2 X cen b 0 = ht of Cz line b 2 = htdif Cz & Tz 1 b 3 = htdif Cz & Tz 2 b 1 = slp of Cz line b 4 = slpdif Cz & Tz 1 b 5 = slpdif Cz & Tz 2 #2b quantitative (Xcen) & 3-group Z 1 Tz1 = 1 Tz2 = 0 Cz = 0 Z 2 Tz1=0 Tz2 = 1 Cz = 0 and interactions XZ 1 = X*Z 1 XZ 2 = X*Z 2
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.