1 / 45

Experimental Design & Analysis

Experimental Design & Analysis. Factorial ANOVA. 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

dennis
Download Presentation

Experimental Design & Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 225cm2 • 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 A 1 2 ........ i Factor B 1 2 j 1 2 j 1 2 j Reps y111yij1 y112yij2 y11kyijk Cell means y11yij

  6. Linear model • yijk = m + ai + bj + (ab)ij + eijk where • m is overall mean • ai is effect of factor A • bi is effect of factor B • (ab)ii is effect of interaction between A and B • eijkis unexplained variation

  7. Worked example Season Spring Summer Density 8 15 30 45 8 15 30 45 Reps n = 3 in each of 8 groups (cells) p = 2 seasons, q = 4 densities

  8. Worked example Cell means: Season Density 8 15 30 45marginal means Spring 2.42 2.18 1.57 1.20 1.84 Summer 1.83 1.18 0.81 0.59 1.10 Density marginal 2.13 1.68 1.19 0.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): • m1, m2...mi • Factor B marginal means (pooling A): • m1, m2...mj

  10. HO: no difference between marginal means of factor A, pooling levels of B • HO: m1 = m2 = mi = m • HO: no main effect of factor A, pooling levels of B (a1 = a2 = … = ai = 0) • Example: • No difference between season marginal means • No effect of season, pooling densities

  11. Cell means Density 8 15 30 45 Season means Spring 2.42 2.18 1.57 1.20 1.84 m spring Summer 1.83 1.18 0.81 0.59 1.10 m summer Density means 2.13 1.68 1.19 0.891.47 m overall m 8 m15 m30 m45

  12. HO: no difference between marginal means of factor B, pooling levels of A • HO: m1 = m2 = mj= m • HO: no main effect of factor B, pooling levels of A (b1 = b2 = … = bi = 0) • Example: • No difference between density marginal means • No effect of density, pooling seasons

  13. Cell means Density 8 15 30 45 Season means Spring 2.42 2.18 1.57 1.20 1.84 m spring Summer 1.83 1.18 0.81 0.59 1.10 m summer Density means 2.13 1.68 1.19 0.891.47 m overall m 8 = m 15 = m 30 = m 45

  14. Interaction • An interaction between 2 factors: • effect of factor A is dependent on level of factor B and vice-versa • HO: 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 (abij = 0) • mij - mi - mj + m = 0

  15. Interaction example from Underwood (1981) • Season: Summer Autumn Winter Spring • Area: 1 2 1 2 1 2 1 2 • 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. 800 600 A1 400 200 A2 800 600 A2 400 200 A1 800 600 400 A2 200 A1 S A W S S A W S 1 2 SEASON SEASON AREA Interaction plot Main effects Cell means Season means Area means MEAN NUMBER PER HAUL

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

  18. Partitioning total variation SSTotal SSA + SSB + SSAB + SSResidual SSA variation between A marginal means SSB variation between B marginal means SSAB variation due to interaction between A and B SSResidual variation between replicates within each cell

  19. Factorial ANOVA table Source SS df MS Factor A SSAp-1 SS Ap-1 Factor B SSBq-1 SS B q-1 Interaction SSAB (p-1)(q-1) SS ABA X B (p-1)(q-1) Residual SSResidualpq(n-1) SS Residualpq(n-1)

  20. Worked example Source SS df MS Season 3.25 1 3.25 Density 5.28 3 1.76 Interaction 0.17 3 0.06 Residual 2.92 16 0.18 Total 11.62 23

  21. Expected mean squares Both factors fixed: • MSAs2 + nqåai2/p-1 • MSBs2 + npåbi2/q-1 • MSA X Bs2 + nåå(ab)ij2/(p-1)(q-1) • MSResiduals2

  22. HO: no interaction • If no interaction: • HO: interaction (abij) = 0 true • F-ratio: • MSAB / MSResidual 1 • Compare F-ratio with F-distribution with (a-1)(b-1) and ab(n-1) df • Determine P-value

  23. HO: no main effects • If no main effect of factor A: • HO: m1 = m2 = mi = m(ai= 0)is true • F-ratio: • MSA / MSResidual 1 • If no main effect of factor B: • HO: m1 = m2 = mj= m(bj= 0)is true • F-ratio: • MSB / MSResidual 1

  24. Worked example Source df MS FP Season 1 3.25 17.84 0.001 Density 3 1.76 9.67 0.001 Interaction 3 0.06 0.30 0.824 Residual 16 0.18 Total 23

  25. Testing of HO’s • Test HO 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 225cm2) • DV = no. egg masses per limpet • n = 3 enclosures per season/density combination

  29. Worked example II Source df MS FP Season 1 17.15 119.85< 0.001 Density 2 2.00 13.980.001 Interaction 2 0.85 5.91 0.016 Residual 12 0.14 Total 17

  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 dfResidual and MSResidual 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 Source df MS FP Density 2 2.00 13.98 0.001 Simple main effects Density in winter 2 0.17 1.21 0.331 Density in summer 2 2.67 18.69 <0.001 Season 1 17.15 119.85 <0.001 Density x Season 2 0.85 5.91 0.016 Treatment-contrast inter. 6 vs (avg 12 & 24) x season 1 1.53 10.66 0.007 Residual 12 0.14

  35. Mixed model Factor A fixed, B random: • MSAs2 + nsab2 + nqåai2/p-1 • MSBs2 + npsb2 • MSA X Bs2 + nsab2 • MSResiduals2

  36. Tests in mixed model • HO: no effect of random interaction A*B: • F-ratio: MSAB / MSResidual • HO: no effect of random factor B: • F-ratio: MSB / MSResidual • HO: no effect of fixed factor A: • F-ratio: MSA / MSAB

  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. 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. Source df MS FP Crab size 2 123.0 2.89 0.082 Scallop size 2 220.3 5.18 0.017 Interaction 4 68.0 1.60 0.218 Residual 18 42.6 Unplanned multiple comparison on main effect of scallop size (pooling crab sizes): S = M < L

  42. McIntosh et al. (1994) • Ecology75 : 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. Source df FP Predator cues 2 1.45 0.261 Time 1 131.88 <0.001 Interaction 2 1.05 0.369 Residual 18

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

More Related