FACTORIAL ANOVA
INTENDED LEARNING OUTCOMES Revise factorial ANOVA (from our last lecture) Discuss degrees of freedom in factorial ANOVA Recognise main effects and interactions Discuss simple effects
QUICK REMINDER FROM LAST LECTURE ON FACTORIAL ANOVA And brief revision of a one-way ANOVA
DIFFERENCE BETWEEN TYPES OF ANOVA Last semester we studied a one-way ANOVA How many IVs did a one-way ANOVA have? The clue is in the name (it had one!) Depending on the study, a one-way ANOVA could have many levels of the IV A one-way ANOVA tests for a difference between 3 or more levels of one IV on one DV
So the basic formula is pretty simple...we are aiming to solve the overall division/ratio: F Ratio Recap ANOVA model F MSbetweengroups MS withingroups and both the MS parts can be broken down into individual variance equations MSbetweengroups SSbetweengroups df betweengroups MSwithingroups SSwithingroups df withingroups
But the reason ANOVA maths gets difficult is because we don t have all the numbers up front. first, we are able to get an overall SS SS total When comparing two or more samples the mean of all the scores together is known as the grand mean x Any score can be expressed as a deviation from the grand mean ie so SS total x x x x ONCE WE HAVE THE SS TOTAL WE KNOW WE CAN BREAK IT DOWN BY PARTITIONING TO GET THE TWO THINGS WE ACTUALLY WANT (SS within and SS between)
Partitioning of Sums of Squares for Oneway ANOVA SS total SS between SS within So remember ANOVA was always checking whether the between groups variance was bigger than that within the within groups variance (which is just general individual differences and nothing to do with the psychological variable of interest).
FACTORIAL ANOVA The main difference here is that since you have the addition of at least one other IV, you now have to do a little more work to calculate the ANOVA
I want to research the effect of therapy on locus of control in people with schizophrenia & people with depression Locus of control is a characteristic of self esteem which we all have and it is markedly low in psychological illness I want to know if therapies will help this one single aspect of psychological illness 3 different levels of therapy (CBT, psychoanalytic, family therapy) & levels of illness types (SZ and depression) My dependent measure is the IMPROVEMENT scores on a test for locus of control by how many they increased from baseline after the therapy (not the raw scores)
EXAMPLE DATA- THE EFFECT OF THERAPY ON LOCUS OF CONTROL FOR DIFFERENT PATIENT GROUPS Factor 1: Therapy Therapy A Therapy B Therapy C x Factor : diagnosis Schizophrenia Depression 4 1 1 5 7 x 3 x 6 x 3 3 1 x 1 x x 3 4 3 x x 3 4 3 3 4
Partitioning of Sums of Squares for Twoway Factorial ANOVA So the between section is now divided into our two factors (IVs) plus the interaction of the two factors. So it s the SS between that is affected and makes it more complicated. The SS within doesn t change here. SS total SS between SS within (error) SS F1 SS F SS F1xF
SUMS OF SQUARES disorder SZ DP 4 1 1 Therapy A B C 5 7 4 x 3 x 6 x 3 3 1 3 3 x 1 x x 3 x 4 3 x 3 x 4 a) SStotal ( x x) ( 3) (4 3) (5 3) etc 36
b) Sum of squares for therapy SS factor 1 nf 1( x f 1 x) 4 1 1 A B C 5 x 3 7 x 6 4 x 3 3 3 x 1 1 x 3 x 3 x 4 3 x 3 x 4 4( 3) 4(4 3) 4(3 3) 8
c) sum of squares for diagnosis SS factor 4 1 1 nf ( x f x) A B C 5 x 3 7 x 6 4 x 3 3 3 x 1 1 x 3 x 3 x 4 3 x 3 x 4 6(4 3) 6( 3) 1
SS d) sum of squares for therapy x diagnosis cells n (3 cells ( x 3) cells x) (6 3) 4 1 1 (3 5 x 3 7 x 6 4 x 3 3 3 x 1 1 x 3 x 3 x 4 3 x 3 3) x 4 (1 3) ( 3) (3 3) 8 SS f SS 8 (8 1) 8 ( SSfactor1 SS ) 1xf cells factor
e) error sum of squares SS error SS total SS cells 36 8 8 or SS total ( SS SS SS factor1 factor f 1xf ) 36 (8 1 8) 8
SS total SS between SS within SS F1 SS F SS F1xF So for all the SS we need, we have done 1) Each individual score minus the overall mean (SS total) ) Each row mean minus the overall mean (SSfactor 1) 3) Each column mean minus the overall mean (SSfactor ) 4) Each individual cell mean minus the overall mean (SS cells/interaction) 5) The total minus the cells/interaction (SSwithin/error)
DEGREES OF FREEDOM... NO MAJOR CALCULATIONS HERE! dftotal total number of scores -1 1-1 11 dffactor1 number of levels of factor1-1 3-1 dffactor number of levels of factor -1-1 1
Interaction degrees of freedom is a simple calculation Multiply the two degrees of freedom for the two factors (IVs) df f1xf df f1 x df f x 1
Error (within) degrees of freedom is another simple calculation df error df total - (df f1 df f df f1xf ) 11- ( 1 ) 6
OVERALL MEAN SQUARES mean square for therapy mean square for diagnosis MS MS factor1 factor SS df 8 factor1 factor1 1 1 4 SS df factor factor 1
mean square for interaction therapy x diagnosis MS f 1xf SS df 8 f 1xf f 1xf 4 mean square for error/within MS error SS df error error 8 6 1.333
FINAL F RATIOS therapy F factor1 MS MS factor1 error 4 1.333 3.000 diagnosis F factor MS MS factor error 1 1.333 9.000 interaction Ff 1 therapy x diagnosis xf MS MS f 1xf error 4 1.333 3.000
Let s go back to our Interaction Graph Therapy A and C are not different from each other in the schizophrenia group! Schizophrenia Mean improvement score Depression Therapy A Therapy B Therapy C Type of treatment No difference between conditions for Therapy C!
SIMPLE EFFECTS How you can learn to love simple effects
A -WAY ANOVA -way ANOVA independent variables (IVs) can have: Main Effect The effects of one independent variable (factor) summed (averaged) over all levels of the other independent variable. Interaction When the effect of one factor is not constant across all levels of the other factors. Significant interactions have implications for main effects!!
PROBLEM WITH THE FACTORIAL ANOVA? Going back to the example of a x ANOVA, you will be calculating 3 F values - One for IV1 (main effect) - One for IV (main effect) - One for the interaction between IV1 and IV When you find an interaction effect, you should be aware that all is not as it might seem, with your main effect So if this happens the test is fine, you haven t done anything bad at all just need to go back and do post hoc analysis to pick it all apart
WHAT ARE SIMPLE EFFECTS? In order to interpret any potential main effects, an analysis of Simple Effects should be conducted (i.e., You should conduct an analysis of simple effects to disentangle the interaction) A simple effects is the effect of ONE independent variable (factor) at each individual level of the other IV (factor) In order for a main effect to be interpretable, the simple effects for that variable must be the same for all levels of the other independent variable.
SIMPLE EFFECTS TESTING FOR TYPE OF THERAPY In this example, there are two simple effects for type of therapy: 1. The effect of treatment for schizophrenia, i.e., the difference between therapies for people with schizophrenia. The effect of treatment for depression, i.e., the difference between therapies for people with depression Analysis = Conduct TWO separate one-way independent groups ANOVA. Using the MSerror from the original two-way ANOVA and appropriate degrees of freedom, to assess if there is any difference between the scores of the three therapies
If the effect of drug is the same for schizophrenics and depressives then there is an interpretable main effect for drug. The question we are addressing here is: - Is the effect for drug consistent (the same) for people with schizophrenia and depression? All we are doing is going back and looking at each group of patients individually, instead of all at once.
SIMPLE EFFECTS TESTING FOR TYPE OF DIAGNOSIS There are three simple effects for type of diagnosis: 1. the differences between patient groups for Therapy A. the differences between patient groups for Therapy B 3. the differences between patient groups for Therapy C Analysis = Conduct one-way independent groups ANOVA (or in this case could do post hoc t-tests as only two groups) using the MSerror from the original two-way ANOVA and appropriate degrees of freedom, to assess if there is any difference between the scores of the participants for each therapy alone
If differences between schizophrenics and depressives are in the same direction for all three types of drug then there is an interpretable main effect for type of problem. The question we are addressing here is: - Is the effect for type of diagnosis consistent (the same) for all three types of drug?
Interaction Graph Schizophrenia Mean improvement score Depression therapy A therapy B therapy C Type of treatment
BONFERRONI If you use the Bonferroni correction when doing simple effects, just like in the one-way ANOVA, the alpha level (.05) is divided by the number of tests you are doing So if you are doing simple effects and your IV has 3 levels, alpha would become.016 If your IV has levels, the alpha would become.05 Remember, we re just dividing.05 by the number of levels of the IV
IMPORTANT DEFINITIONS Factors: independent variables each with a number of levels Factorial Design: an experimental design which uses all combinations of levels of factors. These are called crossed factors. Treatment: A particular combination of levels of the factors. Also known as a cell (in an independent groups design also a group). Main Effect: The effects of one independent variable (factor) summed (averaged) over all levels of the other independent variable Interaction: When the effect of one factor is not constant across all levels of the other factors.
SUMMARY Introduced factorial ANOVA Calculated factorial ANOVA! Discussed main effects and interactions
Next class: Power