Psychology 181 Psychological Data Analysis

advertisement
Psychology 202a
Advanced Psychological
Statistics
December 8, 2015
The plan for today
•
•
•
•
The nested F test
Another two-way ANOVA example
Unbalanced designs
Random effects
The nested F test
• Definition of nested models
– One model is nested within another if it is
possible to change the more complex model
into the simpler one by constraining
parameters.
• Testing for change when a model is
nested within another
The nested F test (cont.)
•
•
•
•
SSchange = SScomplex model - SSsimple model
dfchange = dfcomplex model - dfsimple model
MSchange = SSchange / dfchange
Fchange = MSchange / MSerror, complex model
Using the nested F test
• Illustration using SAS
• We identify the parameters representing
the interaction and do a nested F test.
• Then we identify the parameters
representing the main effect of practice
and do a nested F test.
85
Another Example of Two-way
ANOVA
F
80
Kelly
Nils
F
75
Midterm Mean
M
M
Male
Students
Female
Students
ANOVA with unbalanced data
• In general, if the lack of balance is not
telling us something profound about the
world…
• …then the Type III sum of squares
provides a solution to the problem of
unbalanced designs.
• The TA sex example.
85
Kelly & Nils, Revisited
M
80
F
F
75
Midterm Mean
Nils
M
Male
Students
Kelly
Female
Students
ANOVA with random effects
• Distinguish between fixed effects and
random effects.
• If both are present, then we have a mixedeffects ANOVA.
Fixed-effects Factors
• It may be easiest to understand random-effects
factors by contrasting them with the more
familiar fixed-effects factors.
• Fixed-effects factors are those in which the
populations to which we wish to generalize are
precisely the levels represented in our analysis.
• Examples:
–
–
–
–
Eysenck’s levels of processing
Eysenck’s age groups
Our three practice conditions
Our two reward conditions
Random-effects Factors
• Sometimes the levels represented in our
analysis are an arbitrary sample of a
universe of possible levels.
• When that is true, we refer to the factor as
a random-effects factor.
Examples of Random-effects
Factors
• Patients in hospitals
– If the interest is in how means vary across
hospitals in general, hospital is a random
effect.
• Pupils taught by different teachers
– If the interest is in how student outcome
means vary across teachers in general,
teacher is a random effect.
It’s the question that matters.
• Note that both of those examples could be
fixed effects under the right circumstances:
– An administrator of a group of hospitals is
interested in comparing patient outcomes in her
particular hospitals.
– A high school principal is interested in comparing
student achievement for his particular teachers.
The null hypothesis changes
• If Factor A is a random effect, the null
hypothesis changes.
• Fixed effects:
H 0 : 1  2    k
• Random effects:
H0 :  A  0
2
Two-way ANOVA
• In two-way ANOVA, the presence of a randomeffects factor changes more than the null
hypothesis.
– If factor A is a random effect, test factor B
using the interaction mean square in the
denominator of the F statistic.
– If factor B is a random effect, test factor A
using the interaction mean square in the
denominator of the F statistic.
Next time
• Review for the final exam.
• A study guide has been posted; come to
class prepared to ask questions.
Download