Presentation is loading. Please wait.

Presentation is loading. Please wait.

Two-Way (Independent) ANOVA. PSYC 6130A, PROF. J. ELDER 2 Two-Way ANOVA “Two-Way” means groups are defined by 2 independent variables. These IVs are typically.

Similar presentations


Presentation on theme: "Two-Way (Independent) ANOVA. PSYC 6130A, PROF. J. ELDER 2 Two-Way ANOVA “Two-Way” means groups are defined by 2 independent variables. These IVs are typically."— Presentation transcript:

1 Two-Way (Independent) ANOVA

2 PSYC 6130A, PROF. J. ELDER 2 Two-Way ANOVA “Two-Way” means groups are defined by 2 independent variables. These IVs are typically called factors. An experiment in which any combination of values for the 2 factors can occur is called a completely crossed factorial design. If all cells have the same n, the design is said to be balanced. Still have only 1 dependent variable

3 PSYC 6130A, PROF. J. ELDER 3 Example: Visual Grating Detection in Noise 200 ms Until Response 500 ms

4 PSYC 6130A, PROF. J. ELDER 4 2 x 3 Design Noise Contrast Grating Frequency (c/deg) 0.5 1.7 4.3%14.8% 50.0%

5 PSYC 6130A, PROF. J. ELDER 5 Balanced Design Factor B Factor A

6 PSYC 6130A, PROF. J. ELDER 6 Descriptive Statistics

7 PSYC 6130A, PROF. J. ELDER 7 Interactions If there is no interaction between the factors (spatial frequency, noise contrast), the dependent variable (SNR) for each condition (cell) can be predicted from the independent effects of factors A and B: –Cell mean = Grand mean + Row effect + Column effect

8 PSYC 6130A, PROF. J. ELDER 8 Interactions If there are no interactions, curves should be parallel (effect of noise contrast is independent of spatial frequency).

9 PSYC 6130A, PROF. J. ELDER 9 Types of Effects

10 PSYC 6130A, PROF. J. ELDER 10 Interactions In the general case, Cell mean = Grand mean + Row effect + Column effect + Interaction effect Score deviations from cell means are considered error (unpredictable). Thus: Score = Grand mean + Row effect + Column effect + Interaction effect + Error OR Score - Grand mean = Row effect + Column effect + Interaction effect + Error

11 PSYC 6130A, PROF. J. ELDER 11 Sum of Squares Analysis

12 Multiple Subscript and Summation Notation

13 PSYC 6130A, PROF. J. ELDER 13 Single Subscript Notation X 1 2 12 3 14

14 PSYC 6130A, PROF. J. ELDER 14 Double Subscript Notation

15 PSYC 6130A, PROF. J. ELDER 15 Double Subscript Notation The first subscript refers to the row that the particular value is in, the second subscript refers to the column.

16 PSYC 6130A, PROF. J. ELDER 16 Double Subscript Notation Test your understanding by identifying in the table below.

17 PSYC 6130A, PROF. J. ELDER 17 Double Subscript Notation We will follow the notation of Howell:

18 PSYC 6130A, PROF. J. ELDER 18 Multi-Subscript Notation In two-way ANOVA, 3 indices are needed:

19 PSYC 6130A, PROF. J. ELDER 19 Multi-Subscript Notation Statistics are calculated by summing over scores within cells, and thus the third subscript (k) is dropped:

20 PSYC 6130A, PROF. J. ELDER 20 Multi-Subscript Notation

21 PSYC 6130A, PROF. J. ELDER 21 Pooled Statistics Multi-factor ANOVA requires the calculation of statistics that pool, or ‘collapse’ data over one or more factors. We indicate the factors over which the data are being pooled by substituting a ‘bullet’ for the corresponding index.

22 PSYC 6130A, PROF. J. ELDER 22 Pooled Statistics

23 Six Step Procedure

24 PSYC 6130A, PROF. J. ELDER 24 0.620.290.31 0.360.540.80 Signal to Noise at Threshold.500 Signal to Noise at Threshold 1.700 Spatial Frequency (cpd) Std Deviation.043 Std Deviation.148 Std Deviation.500 Noise Contrast (Michelson units) Example 7.86.46.56.9 9.58.99.89.4 8.77.68.2 Signal to Noise at Threshold (%).500 1.700 Spatial Frequency (cpd) Group Total Mean.043 Mean.148 Mean.500 Noise Contrast (Michelson units) Mean Group Total

25 PSYC 6130A, PROF. J. ELDER 25 Step 1. State the Hypothesis Null hypothesis has 3 parts, e.g., –Mean SNR at threshold same for both spatial frequencies –Mean SNR at threshold same for all noise levels –No interactions

26 PSYC 6130A, PROF. J. ELDER 26 Step 2. Select Statistical Test and Significance Level Normally use same  -level for testing all 3 F ratios.

27 PSYC 6130A, PROF. J. ELDER 27 Step 3. Select Samples and Collect Data Strive for a balanced design Ideally, randomly sample More probably, random assignment

28 PSYC 6130A, PROF. J. ELDER 28 Step 4. Find Regions of Rejection Generally have 3 different critical values for each F test Denominator Numerator

29 PSYC 6130A, PROF. J. ELDER 29 Degrees of Freedom Tree

30 PSYC 6130A, PROF. J. ELDER 30 Step 5. Calculate the Test Statistics

31 PSYC 6130A, PROF. J. ELDER 31 Step 5. Calculate the Test Statistics

32 PSYC 6130A, PROF. J. ELDER 32 Step 6. Make the Statistical Decisions Note that 3 independent statistical decisions are being made. Thus the probability of one or more Type I errors is greater than the α value used for each test. It is not common to correct for this. You should be aware of this issue as both a producer and consumer of scientific results!

33 PSYC 6130A, PROF. J. ELDER 33 SPSS Output Main effects Interaction

34 PSYC 6130A, PROF. J. ELDER 34 SPSS Output

35 PSYC 6130A, PROF. J. ELDER 35 Assumptions of Two-Way Independent ANOVA Same as for One-Way If balanced, don’t have to worry about homogeneity of variance.

36 PSYC 6130A, PROF. J. ELDER 36 Advantages of 2-Way ANOVA with 2 Experimental Factors One factor may not be of interest (e.g., gender), but may affect the dependent variable. Explicitly partitioning the data according to this ‘nuisance’ variable can increase the power of tests on the independent variable of interest.

37 PSYC 6130A, PROF. J. ELDER 37 Simple Effects When significant main effects are discovered, it is common to also test for simple effects.

38 PSYC 6130A, PROF. J. ELDER 38 Simple Effects A main effect is an effect of one factor measured by collapsing (pooling) over all other factors. A simple effect is an effect of one factor measured by fixing all other factors. Although we found significant main effects, given the significant interaction, these main effects do not necessarily imply similarly significant simple effects.

39 PSYC 6130A, PROF. J. ELDER 39 Simple Effects Thus, particularly when a significant interaction is observed, a factorial ANOVA is often followed up by a series of one-way ANOVAS to test simple effects. For our example, there are a total of 5 possible simple effects to test.

40 PSYC 6130A, PROF. J. ELDER 40 Simple Effects To conduct follow-up one- way ANOVA tests of simple effects in SPSS: –Select Split File … from the Data menu –Click on Organize Output by Groups –Transfer the factor to be held constant to the space labeled “Groups Based On.” –Now proceed with one- way ANOVAS as usual.

41 PSYC 6130A, PROF. J. ELDER 41 Simple Effects Test of Homogeneity of Variances a Signal to Noise at Threshold 5.120227.013 Levene Statisticdf1df2Sig. Spatial Frequency (cpd) =.500 a. ANOVA a Signal to Noise at Threshold.0012 32.990.000.00127.000.00229 Between Groups Within Groups Total Sum of SquaresdfMean SquareFSig. Spatial Frequency (cpd) =.500 a. Robust Tests of Equality of Means b Signal to Noise at Threshold 21.413216.975.000 32.990217.382.000 Welch Brown-Forsythe Statistic a df1df2Sig. Asymptotically F distributed. a. Spatial Frequency (cpd) =.500 b.

42 PSYC 6130A, PROF. J. ELDER 42 Simple Effects Test of Homogeneity of Variances a Signal to Noise at Threshold 2.037227.150 Levene Statisticdf1df2Sig. Spatial Frequency (cpd) = 1.700 a. ANOVA a Signal to Noise at Threshold.0002 5.899.007.00127.000.00129 Between Groups Within Groups Total Sum of SquaresdfMean SquareFSig. Spatial Frequency (cpd) = 1.700 a. Robust Tests of Equality of Means b Signal to Noise at Threshold 5.527216.511.015 5.899219.883.010 Welch Brown-Forsythe Statistic a df1df2Sig. Asymptotically F distributed. a. Spatial Frequency (cpd) = 1.700 b.

43 PSYC 6130A, PROF. J. ELDER 43 Simple Effects Again note that multiple independent statistical decisions are being made. Conditioning the test for simple effects on a significant main effect provides protection if only 2 simple effects are being tested. Otherwise, the probability of one or more Type I errors is greater than the α value used for each test. It is not common to correct for this. You should be aware of this issue as both a producer and consumer of scientific results!

44 End of Lecture April 8, 2009

45 PSYC 6130A, PROF. J. ELDER 45 Planned or Posthoc Pairwise Comparisons If significant main (and possibly simple) effects are found, it is common to follow up with one or more pairwise tests. It is most common to test differences between marginal means within a factor (i.e., pooling over the other factor). In this example, there are only 3 meaningful posthoc tests on marginal means. Why?

46 PSYC 6130A, PROF. J. ELDER 46 Pairwise Comparisons on Marginal Means Since there are 3 levels of noise, we can consider using Fisher’s LSD. However, since variances do not appear homogeneous, we should not use an LSD based on pooling the variance over all 3 conditions. Test of Homogeneity of Variances Signal to Noise at Threshold 12.229257.000 Levene Statisticdf1df2Sig.

47 PSYC 6130A, PROF. J. ELDER 47 Pairwise Comparisons on Marginal Means Alternative when variances appear heterogeneous: –Compute Fisher’s LSD by hand, calculating standard error separately for each test (not difficult) –One of the unequal variance post-hoc tests offered by SPSS

48 PSYC 6130A, PROF. J. ELDER 48 Planned or Posthoc Pairwise Comparisons It is also possible to test differences between cell means. Note that in this design, there are 15 possible pairwise cell comparisons. It doesn’t make that much sense to compare 2 cells that are not in the same row or column (i.e. that differ in both factors). It is more likely that you would follow a significant simple effect test with a set of pairwise comparisons within a factor while holding the other factor constant. There are 9 such comparisons possible here. For example, within a spatial frequency condition, what noise conditions differ significantly? This defines a total of 6 pairwise comparisons (2 families of 3 comparisons each).

49 PSYC 6130A, PROF. J. ELDER 49 Planned or Posthoc Pairwise Comparisons Alternative when variances appear heterogeneous: –Compute Fisher’s LSD by hand, calculating standard error separately for each test (not difficult) –One of the unequal variance post-hoc tests offered by SPSS (assumes all- pairs)

50 PSYC 6130A, PROF. J. ELDER 50 Interaction Comparisons If significant interactions are found in a design that is 2x3 or larger, it may be of interest to test the significance of smaller (e.g., 2x2) interactions. These can be tested by ignoring specific subsets of the data for each test (e.g., by using the SPSS Select Cases function).

51 PSYC 6130A, PROF. J. ELDER 51 Unbalanced Designs for Two-Way ANOVA Dealing with unbalanced designs is easy for One-Way ANOVA. Dealing with unbalanced designs is trickier for Two-Way.

52 PSYC 6130A, PROF. J. ELDER 52 Simple Solution Let n = harmonic mean of sample sizes. Calculate marginal means as an unweighted mean of cell means (not the pooled mean).

53 PSYC 6130A, PROF. J. ELDER 53 Better Solution Regression approach to ANOVA (will not cover)


Download ppt "Two-Way (Independent) ANOVA. PSYC 6130A, PROF. J. ELDER 2 Two-Way ANOVA “Two-Way” means groups are defined by 2 independent variables. These IVs are typically."

Similar presentations


Ads by Google