Presentation on theme: "Psychology 202a Advanced Psychological Statistics December 9, 2014."— Presentation transcript:
Psychology 202a Advanced Psychological Statistics December 9, 2014
The plan for today Where do the sums of squares come from? Two-way ANOVA and the linear model The nested F test Another example Unbalanced designs Random effects
Computation two-way ANOVA SS for each main effect is the same that it would be in a simple ANOVA. SS for the interaction is the SS across all cells minus the SS for the two main effects. SS e is the within-cell SS pooled across all cells. Illustration in SAS
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.) SS change = SS complex model - SS simple model df change = df complex model - df simple model MS change = SS change / df change F change = MS change / MS error, 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.
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.
Completing sparse ANOVA tables ANOVA tables may be completed from surprisingly sparse information. This is a common way of checking your understanding of ANOVA structure on exams. Examples on the board
ANOVA with random effects Distinguish between fixed effects and random effects. If both are present, then we have a mixed- effects 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 his 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: Random effects:
Two-way ANOVA In two-way ANOVA, the presence of a random- effects 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.