ANOVA TABLE

download ANOVA TABLE

If you can't read please download the document

description

ANOVA TABLE. Factorial Experiment Completely Randomized Design. Anova table for the 3 factor Experiment. Sum of squares entries. Similar expressions for SS B , and SS C. Similar expressions for SS BC , and SS AC. Sum of squares entries. Finally. - PowerPoint PPT Presentation

Transcript of ANOVA TABLE

  • ANOVA TABLEFactorial ExperimentCompletely Randomized Design

  • Anova table for the 3 factor Experiment

    SourceSSdfMSFp -valueASSAa - 1MSAMSA/MSError

    BSSBb - 1MSBMSB/MSError

    CSSCc - 1MSCMSC/MSError

    ABSSAB(a - 1)(b - 1)MSABMSAB/MSError

    ACSSAC(a - 1)(c - 1)MSACMSAC/MSError

    BCSSBC(b - 1)(c - 1)MSBCMSBC/MSError

    ABCSSABC(a - 1)(b - 1)(c - 1)MSABCMSABC/MSError

    ErrorSSErrorabc(n - 1)MSError

  • Sum of squares entriesSimilar expressions for SSB , and SSC.Similar expressions for SSBC , and SSAC.

  • Sum of squares entriesFinally

  • The statistical model for the 3 factor Experiment

  • Anova table for the 3 factor Experiment

    SourceSSdfMSFp -valueASSAa - 1MSAMSA/MSError

    BSSBb - 1MSBMSB/MSError

    CSSCc - 1MSCMSC/MSError

    ABSSAB(a - 1)(b - 1)MSABMSAB/MSError

    ACSSAC(a - 1)(c - 1)MSACMSAC/MSError

    BCSSBC(b - 1)(c - 1)MSBCMSBC/MSError

    ABCSSABC(a - 1)(b - 1)(c - 1)MSABCMSABC/MSError

    ErrorSSErrorabc(n - 1)MSError

  • The testing in factorial experiments Test first the higher order interactions.If an interaction is present there is no need to test lower order interactions or main effects involving those factors. All factors in the interaction affect the response and they interactThe testing continues with lower order interactions and main effects for factors which have not yet been determined to affect the response.

  • Random Effects and Fixed Effects Factors

  • So far the factors that we have considered are fixed effects factorsThis is the case if the levels of the factor are a fixed set of levels and the conclusions of any analysis is in relationship to these levels.If the levels have been selected at random from a population of levels the factor is called a random effects factorThe conclusions of the analysis will be directed at the population of levels and not only the levels selected for the experiment

  • Example - Fixed EffectsSource of Protein, Level of Protein, Weight GainDependentWeight Gain IndependentSource of Protein,BeefCerealPork Level of Protein,HighLow

  • Example - Random EffectsIn this Example a Taxi company is interested in comparing the effects of three brands of tires (A, B and C) on mileage (mpg). Mileage will also be effected by driver. The company selects b = 4 drivers at random from its collection of drivers. Each driver has n = 3 opportunities to use each brand of tire in which mileage is measured.DependentMileage IndependentTire brand (A, B, C),Fixed Effect FactorDriver (1, 2, 3, 4),Random Effects factor

  • The Model for the fixed effects experimentwhere m, a1, a2, a3, b1, b2, (ab)11 , (ab)21 , (ab)31 , (ab)12 , (ab)22 , (ab)32 , are fixed unknown constants And eijk is random, normally distributed with mean 0 and variance s2.Note:

  • The Model for the case when factor B is a random effects factorwhere m, a1, a2, a3, are fixed unknown constants And eijk is random, normally distributed with mean 0 and variance s2. bj is normal with mean 0 and varianceand (ab)ij is normal with mean 0 and varianceNote:This model is called a variance components model

  • The Anova table for the two factor model

    SourceSSdfMSASSAa -1SSA/(a 1)BSSAb - 1SSB/(a 1)ABSSAB(a -1)(b -1)SSAB/(a 1) (a 1)ErrorSSErrorab(n 1)SSError/ab(n 1)

  • The Anova table for the two factor model (A, B fixed) EMS = Expected Mean Square

    SourceSSdfMSEMSFASSAa -1MSAMSA/MSErrorBSSAb - 1MSBMSB/MSErrorABSSAB(a -1)(b -1)MSABMSAB/MSErrorErrorSSErrorab(n 1)MSError

  • The Anova table for the two factor model (A fixed, B - random) Note: The divisor for testing the main effects of A is no longer MSError but MSAB.

    SourceSSdfMSEMSFASSAa -1MSAMSA/MSABBSSAb - 1MSBMSB/MSErrorABSSAB(a -1)(b -1)MSABMSAB/MSErrorErrorSSErrorab(n 1)MSError

  • Rules for determining Expected Mean Squares (EMS) in an Anova TableSchultz E. F., Jr. Rules of Thumb for Determining Expectations of Mean Squares in Analysis of Variance,Biometrics, Vol 11, 1955, 123-48. Both fixed and random effectsFormulated by Schultz[1]

  • The EMS for Error is s2.The EMS for each ANOVA term contains two or more terms the first of which is s2.All other terms in each EMS contain both coefficients and subscripts (the total number of letters being one more than the number of factors) (if number of factors is k = 3, then the number of letters is 4)The subscript of s2 in the last term of each EMS is the same as the treatment designation.

  • The subscripts of all s2 other than the first contain the treatment designation. These are written with the combination involving the most letters written first and ending with the treatment designation. When a capital letter is omitted from a subscript , the corresponding small letter appears in the coefficient.For each EMS in the table ignore the letter or letters that designate the effect. If any of the remaining letters designate a fixed effect, delete that term from the EMS.

  • Replace s2 whose subscripts are composed entirely of fixed effects by the appropriate sum.

  • Example: 3 factors A, B, C all are random effects

  • Example: 3 factors A fixed, B, C random

  • Example: 3 factors A , B fixed, C random

  • Example: 3 factors A , B and C fixed

  • Example - Random EffectsIn this Example a Taxi company is interested in comparing the effects of three brands of tires (A, B and C) on mileage (mpg). Mileage will also be effected by driver. The company selects at random b = 4 drivers at random from its collection of drivers. Each driver has n = 3 opportunities to use each brand of tire in which mileage is measured.DependentMileage IndependentTire brand (A, B, C),Fixed Effect FactorDriver (1, 2, 3, 4),Random Effects factor

  • The Data

    Generator

    s30

    453

    55-10

    -0.4314131274-2.9177726901-5.8357909438-6.402915460131.650814182428.732795928713.165671412529.5685868726

    2.082276751-0.748086677-3.39830876331.717298800936.33419007433.683967987723.79957555232.082276751

    2.71862745650.6079380912.72083525494.659077603738.326565547540.439462711427.377705060232.7186274565

    3.6222218114-3.27846464641.79550625030.960671968635.34375716540.417728061724.5828937833.6222218114

    3528.925.91429.1

    33.934.524.130.7

    42.242.727.430.7

    35.136.626.432.4

    35.128.319.931.3

    35.538.528.337.9

    35.840.626.533.7

    40.135.114.625.8

    Data

    DriverTireMileage

    1A39.6

    1A38.6

    1A41.9

    1B18.1

    1B20.4

    1B19

    1C31.1

    1C29.8

    1C26.6

    2A38.1

    2A35.4

    2A38.8

    2B18.2

    2B14

    2B15.6

    2C30.2

    2C27.9

    2C27.2

    3A33.9

    3A43.2

    3A41.3

    3B17.8

    3B21.3

    3B22.3

    3C31.3

    3C28.7

    3C29.7

    4A36.9

    4A30.3

    4A35

    4B17.8

    4B21.2

    4B24.3

    4C27.4

    4C26.6

    4C21

    Data (2)

    DriverTireMileageDriverTireMileage

    1A39.63A33.9

    1A38.63A43.2

    1A41.93A41.3

    1B18.13B17.8

    1B20.43B21.3

    1B193B22.3

    1C31.13C31.3

    1C29.83C28.7

    1C26.63C29.7

    2A38.14A36.9

    2A35.44A30.3

    2A38.84A35

    2B18.24B17.8

    2B144B21.2

    2B15.64B24.3

    2C30.24C27.4

    2C27.94C26.6

    2C27.24C21

    Sheet2

    Sheet3

  • Asking SPSS to perform Univariate ANOVA

  • Select the dependent variable, fixed factors, random factors

  • The OutputThe divisor for both the fixed and the random main effect is MSABThis is contrary to the advice of some texts

  • The Anova table for the two factor model (A fixed, B - random) Note: The divisor for testing the main effects of A is no longer MSError but MSAB.References Guenther, W. C. Analysis of Variance Prentice Hall, 1964

    SourceSSdfMSEMSFASSAa -1MSAMSA/MSABBSSAb - 1MSBMSB/MSErrorABSSAB(a -1)(b -1)MSABMSAB/MSErrorErrorSSErrorab(n 1)MSError

  • The Anova table for the two factor model (A fixed, B - random) Note: In this case the divisor for testing the main effects of A is MSAB . This is the approach used by SPSS.References Searle Linear Models John Wiley, 1964

    SourceSSdfMSEMSFASSAa -1MSAMSA/MSABBSSAb - 1MSBMSB/MSABABSSAB(a -1)(b -1)MSABMSAB/MSErrorErrorSSErrorab(n 1)MSError

  • Crossed and Nested Factors

  • The factors A, B are called crossed if every level of A appears with every level of B in the treatment combinations.Levels of BLevels of A

  • Factor B is said to be nested within factor A if the levels of B differ for each level of A. Levels of BLevels of A

  • Example: A company has a = 4 plants for producing paper. Each plant has 6 machines for producing the paper. The company is interested in how paper strength (Y) differs from plant to plant and from machine to machine within plant PlantsMachines

  • Machines (B) are nested within plants (A)The model for a two factor experiment with B nested within A.

  • The ANOVA tableNote: SSB(A ) = SSB + SSAB and a(b 1) = (b 1) + (a - 1)(b 1)

    SourceSSdfMSFp - valueASSAa - 1MSAMSA/MSErrorB(A)SSB(A)a(b 1)MSB(A)MSB(A) /MSError

    ErrorSSErrorab(n 1)MSError

  • Example: A company has a = 4 plants for producing paper. Each plant has 6 machines for producing the paper. The company is interested in how paper strength (Y) differs from plant to plant and from machine to machine within plant. Also we have n = 5 measurements of paper strength for each of the 24 machines

  • The Data

    Plant

    1

    2

    machine

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    98.7

    59.2

    84.1

    72.3

    83.5

    60.6

    33.6

    44.8

    58.9

    63.9

    63.7

    48.1

    93.1

    87.8

    86.3

    110.3

    89.3

    84.8

    48.2

    57.3

    51.6

    62.3

    54.6

    50.6

    100.0

    84.1

    83.4

    81.6

    86.1

    83.6

    68.9

    66.5

    45.2

    61.1

    55.3

    39.9

    Plant

    3

    4

    machine

    13

    14

    15

    16

    17

    18

    19

    20

    21

    22

    23

    24

    83.6

    76.1

    64.2

    69.2

    77.4

    61.0

    64.2

    35.5

    46.9

    37.0

    43.8

    30.0

    84.6

    55.4

    58.4

    86.7

    63.3

    81.3

    50.3

    30.8

    43.1

    47.8

    62.4

    43.0

    90.6

    92.3

    75.4

    60.8

    76.6

    73.8

    32.1

    36.3

    40.8

    41.0

    60.8

    56.9

  • Anova Table Treating Factors (Plant, Machine) as crossed

  • Anova Table: Two factor experiment B(machine) nested in A (plant)

    Sheet1

    SourceSum of SquaresdfMean SquareF

    Plant18174.761193055436058.253731018552.81950628360.00000

    Machine(Plant)2856.303672222220142.81518361111.24514882060.26171

    Error5505.469466666748114.6972805556

    Sheet2

    Sheet3

  • GraphPaper Strength

    Chart1

    97.266666666750.233333333386.266666666748.8666666667

    77.033333333356.274.634.2

    84.651.96643.6

    88.066666666762.433333333372.233333333341.9333333333

    86.357.866666666772.433333333355.6666666667

    76.333333333346.272.033333333343.3

    Plant 1

    Plant 2

    Plant 3

    Plant 5

    Machine

    Sheet1

    Plant12

    machine123456789101112

    98.759.284.172.383.560.633.644.858.963.963.748.1

    93.187.886.3110.389.384.848.257.351.662.354.650.6

    10084.183.481.686.183.668.966.545.261.155.339.9

    Plant34

    machine131415161718192021222324

    83.676.164.269.277.46164.235.546.93743.830

    84.655.458.486.763.381.350.330.843.147.862.443

    90.692.375.460.876.673.832.136.340.84160.856.9

    197.266666666777.033333333384.688.066666666786.376.333333333350.233333333356.251.962.433333333357.866666666746.2

    486.266666666774.66672.233333333372.433333333372.033333333348.866666666734.243.641.933333333355.666666666743.3

    1234

    197508649

    277567534

    385526644

    488627242

    586587256

    676467243

    Sheet1

    Plant 1

    Plant 2

    Plant 3

    Plant 5

    Machine

    Sheet2

    Sheet3