Docsity

Two-Factor Design: Estimating Model Parameters and Anova, Study notes of Statistics

Toggle sidebar
bg1
Two-Factor Design: Estimating Model Parameters
•Recall the model:
yi,j,k =µ+τi+βj+ (τβ)i,j +i,j,k
•With the natural constraints,
E(¯y···)=µ
E(¯yi··)=µ+τi
E¯y·j·=µ+βj
E¯yi,j·=µ+τi+βj+ (τ β)i,j
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Two-Factor Design: Estimating Model Parameters and Anova and more Study notes Statistics in PDF only on Docsity!

Two-Factor Design: Estimating Model Parameters

  • Recall the model: yi,j,k = μ + τi + βj + (τ β)i,j + i,j,k
  • With the natural constraints,

E (¯y···) = μ E (¯yi··) = μ + τi E

( ¯y·j·

) = μ + βj E

( ¯yi,j·

) = μ + τi + βj + (τ β)i,j

  • So the obvious parameter estimates are

ˆμ = ¯y··· ˆτi = ¯yi·· − μˆ = ¯yi·· − ¯y··· β^ ˆj = ¯y·j· − μˆ = ¯y·j· − ¯y··· ( τ β̂ ) = ¯yi,j· −

( μ ˆ + ˆτi + ˆβj

)

= ¯yi,j· − ¯yi·· − y¯·j· + ¯y···

  • These are also least squares estimates.
  • Example: Battery life

Interaction model

> summary(aov(Life ~ factor(Material) * factor(Temperature), batteryLife)) Df Sum Sq Mean Sq F value Pr(>F) factor(Material) 2 10684 5342 7.9114 0.001976 ** factor(Temperature) 2 39119 19559 28.9677 1.909e-07 *** factor(Material):factor(Temperature) 4 9614 2403 3.5595 0.018611 * Residuals 27 18231 675

Signif. codes: 0 *** 0.001 ** 0.01 * 0.05. 0.1 1

Additive model

> summary(aov(Life ~ factor(Material) + factor(Temperature), batteryLife)) Df Sum Sq Mean Sq F value Pr(>F) factor(Material) 2 10684 5342 5.9472 0.006515 ** factor(Temperature) 2 39119 19559 21.7759 1.239e-06 *** Residuals 31 27845 898

Signif. codes: 0 *** 0.001 ** 0.01 * 0.05. 0.1 1

One Observation per Cell

  • Only a single replicate:

yi,j = μ + τi + βj + (τ β)i,j + i,j

  • Degrees of freedom for error = ab(n − 1) = 0.
  • Additive (no-interaction) model may still be fitted and tested.
  • Example: impurity data, in R:

> a = aov(Impurity ~ factor(Temperature) + factor(Pressure), impurity); > summary(a) Df Sum Sq Mean Sq F value Pr(>F) factor(Temperature) 2 23.333 11.667 46.667 3.885e-05 *** factor(Pressure) 4 11.600 2.900 11.600 0.002063 ** Residuals 8 2.000 0.

Signif. codes: 0 *** 0.001 ** 0.01 * 0.05. 0.1 1 > b = aov(Impurity ~ factor(Temperature) + factor(Pressure)

  • I(fitted(a)^2), impurity) > summary(b); Df Sum Sq Mean Sq F value Pr(>F) factor(Temperature) 2 23.3333 11.6667 42.9491 0.0001174 *** factor(Pressure) 4 11.6000 2.9000 10.6759 0.0042006 ** I(fitted(a)^2) 1 0.0985 0.0985 0.3627 0. Residuals 7 1.9015 0.

Signif. codes: 0 *** 0.001 ** 0.01 * 0.05. 0.1 1

General Factorial Model

  • More than two factors.
  • Terms in model:
    • main effects A, B, C,... ;
    • two-factor interactions AB, AC,... ;
    • three-factor interactions ABC,... ;
    • and so on.
  • In R:

> softDrinkBottling = read.table("soft-drink-bottling.txt", header = TRUE); > softDrinkBottling[, "C"] = factor(softDrinkBottling[, "Carbonation"]); > softDrinkBottling[, "P"] = factor(softDrinkBottling[, "Pressure"]); > softDrinkBottling[, "S"] = factor(softDrinkBottling[, "Speed"]); > a = aov(Height ~ C * P * S, softDrinkBottling); > summary(a); Df Sum Sq Mean Sq F value Pr(>F) C 2 252.750 126.375 178.4118 1.186e-09 *** P 1 45.375 45.375 64.0588 3.742e-06 *** S 1 22.042 22.042 31.1176 0.0001202 *** C:P 2 5.250 2.625 3.7059 0.. C:S 2 0.583 0.292 0.4118 0. P:S 1 1.042 1.042 1.4706 0. C:P:S 2 1.083 0.542 0.7647 0. Residuals 12 8.500 0.

Signif. codes: 0 *** 0.001 ** 0.01 * 0.05. 0.1 1

  • Interaction plot:

with(softDrinkBottling, interaction.plot(Carbonation, Pressure, Height));

0

2

4

6

8

Carbonation

mean of Height

10 12 14

Pressure (^3025)

  • Statistical model for blocked two-factor design (no interac- tion between block and experimental factors):

yi,j,k = μ + τi + βj + (τ β)i,j + δk + i,j,k

  • With two (or more) nuisance factors, use Latin Square (or hyper-square) design: - E.g. for a 3 × 2 factorial design, use a 6 × 6 Latin Square. - Statistical model:

yi,j,k,l = μ + τi + βj + (τ β)i,j + δk + θl + i,j,k,l