Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright, Gerry Quinn & Mick Keough, 1998 Please do not copy or distribute this file without the authors’ permission Experimental Design & Analysis Factorial.

Similar presentations


Presentation on theme: "Copyright, Gerry Quinn & Mick Keough, 1998 Please do not copy or distribute this file without the authors’ permission Experimental Design & Analysis Factorial."— Presentation transcript:

1 Copyright, Gerry Quinn & Mick Keough, 1998 Please do not copy or distribute this file without the authors’ permission Experimental Design & Analysis Factorial ANOVA

2 Two factor factorial ANOVA Two factors (2 independent variables) –Factor A (with p groups or levels) –Factor B (with q groups or levels) Crossed design: –every level of one factor crossed with every level of second factor –all combinations (i.e. cells) of factor A and factor B

3 Quinn (1988) - fecundity of limpets Factor A is season with 2 levels: –spring, summer Factor B is density with 4 levels: –8, 15, 30, 45 per 225cm 2 n = 3 fences in each combination: –each combination is termed a cell (8 cells) Dependent variable: –fecundity (no. egg masses per limpet)

4 Stehman & Meredith (1995) - growth of fir tree seedlings Factor A is nitrogen with 2 levels –present, absent Factor B is phosphorous with 4 levels –0, 100, 300, 500 kg.ha -1 8 cells, n replicate seedlings in each cell Dependent variable: –growth of Douglas fir trees seedlings

5 Data layout Factor A12........i Factor B12j12j12j Repsy 111 y ij1 y 112 y ij2 y 11k y ijk Cell meansy 11 y ij

6 Linear model y ijk =  +  i +  j + (  ) ij +  ijk where  is overall mean  i is effect of factor A  i is effect of factor B (  ) ii is effect of interaction between A and B  ijk is unexplained variation

7 Worked example SeasonSpringSummer Density81530458153045 Repsn = 3 in each of 8 groups (cells) p = 2 seasons, q = 4 densities

8 Worked example Cell means: Season Density8153045marginal means Spring2.422.181.571.201.84 Summer1.831.180.810.591.10 Density marginal2.131.681.190.891.47 means Grand mean

9 Null hypotheses Main effect: –effect of one factor, pooling over levels of other factor –effect of one factor, independent of other factor Factor A marginal means (pooling B): –  1,  2...  i Factor B marginal means (pooling A): –  1,  2...  j

10 H O : no difference between marginal means of factor A, pooling levels of B –H O :  1 =  2 =  i =  H O : no main effect of factor A, pooling levels of B (  1 =  2 = … =  i = 0) Example: –No difference between season marginal means –No effect of season, pooling densities

11 Density8153045Season means Spring2.422.181.571.201.84  spring Summer1.831.180.810.591.10  summer Density means2.131.681.190.891.47  overall  8  15  30  45 Cell means

12 H O : no difference between marginal means of factor B, pooling levels of A –H O :  1 =  2 =  j =  H O : no main effect of factor B, pooling levels of A (  1 =  2 = … =  i = 0) Example: –No difference between density marginal means –No effect of density, pooling seasons

13 Density8153045Season means Spring2.422.181.571.201.84  spring Summer1.831.180.810.591.10  summer Density means2.131.681.190.891.47  overall  8 =  15 =  30 =  45 Cell means

14 Interaction An interaction between 2 factors: –effect of factor A is dependent on level of factor B and vice-versa H O : no interaction between factor A and factor B: –effects of factor A and factor B are independent of each other –no joint effects of A & B acting together (  ij = 0) –  ij -  i -  j +  = 0

15 Interaction example from Underwood (1981) Season:SummerAutumnWinterSpring Area:12121212 n = 3 plankton tows for each season/area combination DV is no. plankton in each tow cell means (each season/area combination) main effect means: season means pooling areas area means pooling seasons

16 MEAN NUMBER PER HAUL Interaction plot Main effects Cell meansSeason means Area means 200 400 600 800 A1 A2 A1 A2 200 400 600 800 SAWS SEASON AREA 1 2 SAWS SEASON 200 400 600 800 A1 A2

17 Residual variation Variation between replicates within each cell Pooled across cells if homogeneity of variance assumption holds

18 Partitioning total variation SS Total SS A +SS B +SS AB +SS Residual SS A variation between A marginal means SS B variation between B marginal means SS AB variation due to interaction between A and B SS Residual variation between replicates within each cell

19 SourceSSdfMS Factor ASS A p-1SS A p-1 Factor BSS B q-1SS B q-1 InteractionSS AB (p-1)(q-1)SS AB A X B(p-1)(q-1) ResidualSS Residual pq(n-1)SS Residual pq(n-1) Factorial ANOVA table

20 Worked example Season3.2513.25 Density5.2831.76 Interaction0.1730.06 Residual2.92160.18 Total11.6223 SourceSS dfMS

21 Expected mean squares Both factors fixed: MS A  2 + nq  i 2 /p-1 MS B  2 + np  i 2 /q-1 MS A X B  2 + n  (  ) ij 2 /(p-1)(q-1) MS Residual  2

22 H O : no interaction If no interaction: –H O : interaction (  ij ) = 0 true F-ratio: –MS AB / MS Residual  1 Compare F-ratio with F-distribution with (a-1)(b-1) and ab(n-1) df Determine P-value

23 H O : no main effects If no main effect of factor A: –H O :  1 =  2 =  i =  (  i  = 0)  is true F-ratio: –MS A / MS Residual  1 If no main effect of factor B: –H O :  1 =  2 =  j =  (  j  = 0)  is true F-ratio: –MS B / MS Residual  1

24 Worked example Season13.2517.840.001 Density31.769.670.001 Interaction30.060.300.824 Residual160.18 Total23 SourcedfMSFP

25 Testing of H O ’s Test H O of no interaction first: –no significant interaction between density and season (P = 0.824) If not significant, test main effects: –significant effects of season (P = 0.001) and density (P = 0.001) Planned and unplanned comparisons: –applied to interaction and to main effects

26 Interpreting interactions Plotting cell means Multiple comparison across interaction term Simple main effects Treatment-contrast tests Contrast-contrast tests

27 Interaction plot Effect of density same for both seasons Difference between seasons same for all densities Parallel lines in cell means (interaction) plot

28 Worked example II Low shore Siphonaria –larger limpets Two factors –Season (spring and summer) –Density (6, 12, 24 limpets per 225cm 2 ) DV = no. egg masses per limpet n = 3 enclosures per season/density combination

29 Worked example II Season117.15119.85< 0.001 Density22.0013.980.001 Interaction20.855.910.016 Residual120.14 Total17 SourcedfMSFP

30 Interaction plot Effect of density different for each season Difference between seasons varies for each density Non-parallel lines in cell means (interaction) plot

31 Multiple comparison Use Tukey’s test, Bonferroni t-tests etc.: –compare all cell means in interaction Usually lots of means: –lots of non-independent comparisons Often ambiguous results Not very informative, not very powerful

32 Simple main effects Tests across levels of one factor for each level of second factor separately. –Is there an effect of density for winter? –Is there an effect of density for summer? Alternatively –Is there an effect of season for density = 6? –etc. Equivalent to series of one factor ANOVAs Use df Residual and MS Residual from original 2 factor ANOVA

33 Treatment-contrast interaction Do contrasts or trends in one factor interact with levels of other factor? Does the density contrast [6 vs the average of 12 & 24] interact with season?

34 Worked example II Density22.0013.980.001 Simple main effects Density in winter20.171.210.331 Density in summer22.6718.69<0.001 Season117.15119.85<0.001 Density x Season20.855.910.016 Treatment-contrast inter. 6 vs (avg 12 & 24) x season11.5310.660.007 Residual120.14 SourcedfMSFP

35 Mixed model Factor A fixed, B random: MS A  2 + n   2 + nq  i 2 /p-1 MS B  2 + np   2 MS A X B  2 + n   2 MS Residual  2

36 Tests in mixed model H O : no effect of random interaction A*B: –F-ratio: MS AB / MS Residual H O : no effect of random factor B: –F-ratio: MS B / MS Residual H O : no effect of fixed factor A: –F-ratio: MS A / MS AB

37 Assumptions of factorial ANOVA Assumptions apply to DV within each cell Normality –boxplots etc. Homogeneity of residual variance –residual plots, variance vs mean plots etc. Independence

38 Copyright, Gerry Quinn & Mick Keough, 1998 Please do not copy or distribute this file without the authors’ permission Factorial ANOVAs in the literature

39 Barbeau et al. (1994) J. Exp. Mar. Biol. Ecol. 180:103-136 Experiment on consumption rate of crabs feeding on scallops Two factors: –Crab size (3 levels - small, medium, large) –Scallop size (3 levels - small, medium, large)

40 Dependent variable: –consumption rate (number of scallops per predator per day) of crabs (Cancer irroratus) Sample size: –n = 2 - 4 replicate aquaria in each of 9 cells

41 Crab size2123.02.890.082 Scallop size2220.35.180.017 Interaction468.01.600.218 Residual1842.6 SourcedfMSFP Unplanned multiple comparison on main effect of scallop size (pooling crab sizes): S =M<L

42 McIntosh et al. (1994) Ecology 75 : 2078-2090 Effects of predatory fish on drifting behaviour of insects (mayflies) in streams Factors: –Predator cues (3 levels - no fish, galaxids, trout) –Time (2 levels - day, night)

43 Dependent variable: –number of mayflies drifitng Sample size: –n=3 stream channels in each cell

44 Predator cues21.450.261 Time1131.88<0.001 Interaction21.050.369 Residual18 SourcedfFP

45 Assumptions not met? Robust if equal n Transformations important No suitable non-parametric (rank- based) test


Download ppt "Copyright, Gerry Quinn & Mick Keough, 1998 Please do not copy or distribute this file without the authors’ permission Experimental Design & Analysis Factorial."

Similar presentations


Ads by Google