Documente Academic
Documente Profesional
Documente Cultură
8
Analysis
of
Variance
Outline
Introduc)on
Logic
of
ANOVA
Independent
Samples
One-way
ANOVA
Eect
Size
and
Power:
Eta-squared
(
2
)
Omega-squared
(
2
)
Cohens
f.
Power
computa)ons
Mul)ple
Comparison
Procedures
Repeated
Measures
One-way
ANOVA:
Basic
Ideas,
Structural
Model;
Computa)on;
Contrasts;
Post
Hoc
test,
Assump)on
of
Sphericity
Factorial
Analysis
of
Variance:
Two-way
Completely
Independent
ANOVA:
Basic
Ideas;
Main
Eect
and
Interac)on
eect;
The
Structural
Model
and
Par))oning
Sum-of-squares;
Computa)onal
Formula
The
Alterna)ve
Factorial
ANOVA
Designs:
1.
Mixed-factorial
ANOVA;
2.
Completely
Repeated
Measures
Factorial
ANOVA
Mul)variate
Analysis
of
Variances
(MANOVA)
Statistical
IV
Levels
DV
Example
Technique
(Factor)
of
IV
( k k 1) 2 = ( 4 3) 2 = 12 2 = 6 !
The
Type
I
error
for
those
many
(for
example,
3)
comparisons
are
(if
we
use
t-test)
( )
P = 1 (1 )r = 1 (1 .05)3 = 1 .95 3 = 1 .857 = .1426 !
The
chance
that
we
reject
null
when
we
should
have
accepted
it
is
0.1426
for
at
least
one
comparison.
Alterna)ve
is
ANOVA
Founda<ons
of
ANOVA
F-random
variable
12 1
F= 2 !
2 2
The
F
distribu)on
is
+ 2 1
1
1
(1 + 2 )
2 1 2 1
1 1 2
f (x) = x 2
1 + x !
1 2 2
2
2 2
S 2
2
S
The
F
is
equal
to
Fn 1,n 1 = 1 1 = 1 !
2
1 1
S2 2 S2
2 2 2
we have independent random samples
from k populations of size n.
Logic
of
ANOVA
denote xij as i th value in j th population.
If xij is normally distributed with mean
and variance 2 , then we can state that
xij = j + eij
If xij ~ N ( , 2 ) then
xij = + j + eij
where j = 1,, k; i = 1, 2,, n, = grand mean,
j is a treatment effect of the j th group.
The treatment effect is stated as
k
j =0
j=1
H 0 : j = 0
H 0 : j 0
Independent
Samples
One-way
ANOVA
Omnibus
null
hypothesis
regarding
equality
of
popula)on
means
for
all
k-groups.
Par)cipants
are
independent
(o\en
randomly
assigned).
Assump)ons
Normality:
Popula)ons
are
normally
distributed
Homogeneity
of
variances:
Popula)on
variances
of
all
k-groups
are
equal.
H 0 : 1 = 2 = ... = k !
Independence:
HA : j !
Basic
Equa<ons
k n k k n
dfTotal = ( ntotal 1)
Basic
Equa<ons
MSBet
F=
MSW
Solve
Example
8.2
in
the
book
using
these
computa)ons
formula.
Summary
Table
for
Example
8.2
Source
SS
df
MS
F
Between
170.6
3
2
=
2
85.30
6.908
Total 504 30 1 = 29
Omega-squared
SS (k 1) MSW
2 = bet !
SSTotal + MSW
Cohens
f
2
f= !
1 2
Power
Calcula<ons
for
One-way
ANOVA
= f n! = /k !
= /k!
2
k=!
2
Error
Rate
Per
Comparison
Type
I
Error
Rate
()
Family-wise
Type
I
Error
Rate
(fw)
Types
of
Comparisons
Planned
comparisons
or
a
priory
comparisons
Post
hoc
or
unplanned
comparisons
or
posteriori
comparisons
Do
we
need
Signicance
of
F?
Planned
Comparisons
Contrasts
k
a X j j = a1 X1 + a2 X2 + + ak X k = !
j=1
k
Linear
Contrasts
c j =0!
j=1
k
= cj X j !
j=1
Planned
Comparisons
Mul<ple
t-test
Xi X j Xi X j
t= = !
MSW MSW 2MSW
+
n n n
n
Evaluate
F
at
pc
Dunnidk
Correc<on
Planned
Comparisons
Holms
and
Larzelere
and
Mulaik
Test
Mul)stage
Test
(i)
Compute
the
t-values
as
is
discussed
in
Bonferroni
Dunn.
(ii)
Disregarding
the
sign,
arrange
all
t-values
as
per
the
ascending
order,
c
is
the
number
of
contrasts
tested
or
comparisons
carried
out.
(iii)
The
t
is
tested
for
signicance
using
Dunns
cri)cal
c
1
(
LSD = t /2,dfw MSW 1 n + 1 n + + 1 n !
2 k
)
DunneXs
Procedure
2MSW
CDD = t D !
n
Post
Hoc
Tests
Studen<zed
Range
Sta<s<cs
(q)
X L XS
qr = !
MSW n
Sche Test
( )
k
SStreat = n X j X
2
! dftreat = k 1 !
j=1
dfsub = nsub 1 !
( )
nsub
SSsub = k X sub X
2
!
i=1
Use
R
Code
8.14
from
the
book
for
solving
the
repeated
measures
ANOVA.
Assump<on
of
Sphericity
Constant
variance
and
constant
covariance
of
the
popula)on
variance
covariance
matrix.
Its
is
es)mated
by
sample
matrix.
Mauchly's
sphericity
test.
Use
R
Code
8.15
from
the
book
to
carry
out
Mauchly's
sphericity
test.
Factorial
Analysis
of
Variance:
Two-way
Completely
Independent
ANOVA
Factorial
Designs:
More
than
one
IV
Each
IV
is
at
Two
or
more
levels
Three
basic
types
Completely
randomized
(All
cells
independents)
Completely
Repeated
Mixed
(One
IV
is
Randomized
other
Repeated)
Main
Eect
and
Interac<on
Eect
The
main
eect
in
factorial
ANOVA
is
referred
to
the
impact
of
individual
factor
or
IV
on
the
dependent
variable.
Interac)on
eect
is
the
joint
eect
of
independent
variables.
Impact
of
one
of
the
factor
on
DV
changes
as
levels
of
the
other
factor
changes.
Example
IV1:
Media
Condi)on
(2
levels:
Audiotape
or
Videotape)
IV2:
Openness
to
Experience
(2
levels:
Low-openness
and
High-openness)
! ! IV#1:#Media#Condition# !
! ! L1:!Audiotape! L2:!Videotape! !
# L1:!Low1 Low1O!&! Low1O! Low1O!!
IV2:# Openness! Audiotape!! Videotape!! n!=!60!
Openness# n!=!30! n!=!30!
L2:!High1 High1O!&! High1O!&! High1O!!
Openness! Audiotape!! Videotape! n!=!60!
n!=!30! n!=!30!
! ! n!Audiotape!=! n!Videotape!=! Total!n!=!120!
60! 60!
!
Null
and
Alterna<ve
Hypothesis
H 0 : mAudiotape = mVideotape
H A : mAudiotape mVideotape
H 0 : LowO = HighO !
H A : LowO HighO !
( )
n n
SSerror = SSWC = Xijk X jk = ( Xi Xcell ) !
2 2
dfWC = (n jk 1)
i=1 i=1
( )!
2
SSIV 1 = n j X j X dfIV 1 = J 1
= n (X X) !
2
SSIV 2 k k dfIV 2 = k 1
SSIV 1IV 2 = SST ( SSIV 1 + SSIV 2 + SSerror ) ! df
IV 1IV 2 = ( j 1) ( k 1)
( )!
2
SScell = n jk X jk X
Summary
Table
Sum!Sq! Df! Mean!Sq! F!value! Pr(>F)!
!
Media! 8.1$ 1$ 8.1$ 10.196$ 0.00292$
Opn! 44.1$ 1$ 44.1$ 55.51$ <$0.0001$
Opn*Media! 3.6$ 1$ 3.6$ 4.531$ 0.04019$
Residuals! 28.6$ 36$ 0.79$
Total! 84.4$ $ $
! $ $ $ $
Mixed-factorial
ANOVA
SSTotal = SSIV 1 + SSwithin + SSIV 2 + SSIV 1IV 2 + SSIV 2within !
2 = ( N 1) 0.5 ( p + k ) ln
df = p(k 1)
Use
8.8.4
small
sample
worked
out
example
from
book.
Usr
R
Code
8.19
and
8.21.