General Linear Model: Advance Methods of Research Masters of Engineering Program Major in Electrical Engineering
General Linear Model: Advance Methods of Research Masters of Engineering Program Major in Electrical Engineering
General Linear Model: Advance Methods of Research Masters of Engineering Program Major in Electrical Engineering
𝑌 =𝜇+𝛼+𝜀
Score = Grand mean + Independent variable + Error
The basic idea is that everyone in the population has the same
score (the grand mean) that is changed by the effects of an
independent variable (A) plus just random noise (error).
Some levels of IV raise scores from the GM, other levels lower
scores from the GM and yet others have no effect.
General Linear Model
General form:
𝑌𝑖 = 𝛽𝑜 + 𝛽1 𝑋1 + 𝛽2 𝑋2 + ⋯ . 𝛽𝑘 𝑋𝑘 + 𝜀
Where:
𝛽𝑜 =Y-intercept
𝛽1 = Slope of Y with variable 𝑋1 .
𝛽2 = Slope of Y with variable 𝑋1 .
.
.
𝛽𝑘 = Slope of Y with variable 𝑋𝑘 .
𝜀 = random error in Y for observation i.
Assumptions for a GLM
22 2 290 124140
−1.0621
41 4.5 500 𝛽= 𝑋𝑋′ −1 ′
𝑋 𝑌 = 8.6522
0.0070
34 3.5 350
12 1.5 250 𝑌𝑖 = 𝛽𝑜 + 𝛽1 𝑋1 + 𝛽2 𝑋2
23 3 300
𝒀 = −𝟏. 𝟎𝟔𝟐 + 𝟖. 𝟔𝟓𝟐𝑿𝟏 + 𝟎. 𝟎𝟎𝟕𝑿𝟐
Develop a prediction equation.
Using MATLAB:
Using Microsoft Excel:
ANOVA Summary Table for
the Overall F test
Source df SS MS F-test
𝑆𝑆𝑅 𝑀𝑆𝑅
𝑀𝑆𝑅 = 𝐹=
Regression k SSR 𝑘 𝑀𝑆𝐸
𝑆𝑆𝐸
𝑀𝑆𝐸 =
Error n–k-1 SSE 𝑛−𝑘−1
• Hypotheses:
𝐻𝑜 : 𝛽1 = ⋯ . = 𝛽𝑘 = 0 (No linear relationship bet DV and IV).
𝐻𝑖 : At least one 𝛽 ≠ 0 (linear relationship bet DV and IV)
ANOVA Table:
a1 a2
Case Score Case Score
s1 5 s6 5
s2 5 s7 5
s3 5 s8 5
s4 5 s9 5
s5 5 s10 5
General Linear Model (GLM)
Then we add in the effect of A (a1 adds 2 points and a2
subtracts 2 points).
a1 a2
Case Score Case Score
s1 5+2=7 s6 5–2=3
s2 5+2=7 s7 5–2=3
s3 5+2=7 s8 5–2=3
s4 5+2=7 s9 5–2=3
s5 5+2=7 s10 5–2=3
Ya1 35 Ya2 15
a1 245
Y 2
a2 45
Y 2
Ya1 7 Ya3 3
General Linear Model (GLM)
Now if we add in some random variation (error).
a1 a2
Case Score Case Score SUM
s1 5+2+2=9 s6 5–2+0=3
s2 5+2+0=7 s7 5–2–2=1
s3 5+2–1=6 s8 5–2+0=3
s4 5+2+0=7 s9 5–2+1=4
s5 5+2–1=6 s10 5–2+1=4
Ya1 35 Ya2 15 Y 50
a1 251
Y 2
a2 51
Y 2
Y 302
2
Ya1 7 Ya3 3 Y 5
General Linear Model (GLM)
Now if we calculate the variance for each group:
Y 2
( Y ) 2
251
35 2
a1
sN2 1 N 5 1.5
N 1 4
Ya2
2 ( Y ) 2
51
152
sN2 1 N 5 1.5
N 1 4
The average variance in this case is also going to be 1.5
((1.5 + 1.5 ) / 2)
General Linear Model (GLM)
We can also calculate the total variability in the data
regardless of treatment group.
Y
2 ( Y ) 2
302
50 2
sN2 1 N 10 5.78
N 1 9
Y
2 ( Y ) 2
302
50 2
sN2 1 N 10 5.78
N 1 9
Y ij GM Yij Y j Y j GM
Source SS df MS F
A 40 1 40 26.67
S/A 12 8 1.5
Total 52 9
Analysis – regression approach
Levels of A Cases Y X YX
S1 9 1 9
S2 7 1 7
a1 S3 6 1 6
S4 7 1 7
S5 6 1 6
S6 3 -1 -3
S7 1 -1 -1
a2 S8 3 -1 -3
S9 4 -1 -4
S10 4 -1 -4
Sum 50 0 20
Squares Summed 302 10
N 10
Mean 5
Analysis – regression approach
Y = a + bX + e
e = Y – Y’
• Sums of squares
Y
2
502
SS (Y ) Y 2 302 52
N 10
X
2
2
0
SS ( X ) X 2
10 10
N 10
( Y )( X ) (50)(0)
SP(YX ) YX 20 20
N 10
Analysis – regression approach
• Slope
( Y )( X )
YX N SP(YX ) 20
b 2
2
X SS ( X ) 10
N
X 2
• Intercept
a Y bX 5 2(0) 5
Analysis – regression approach
Y ' a bX
For a1 :
Y ' 5 2(1) 7
For a 2 :
Y ' 5 2(1) 3
Analysis – regression approach
Degrees of freedom
df(reg.) = # of predictors
df(total) = number of cases – 1
df(resid.) = df(total) – df(reg.) =
9–1=8
SUMMARY:
The general linear model or multivariate regression model is a statistical linear
model. It may be written as