Unreplicated Two-Way ANOVA Model, addendum

Adhesive Example, revisited

> adhesive.lm <− lm(strength~factor(pressure)+factor(temperature),

+                   data=adhesive)

> r <− residuals(adhesive.lm)

> qij <− fitted(adhesive.lm)^2

> rstar <− resid(lm(qij~factor(adhesive$p)+factor(adhesive$t)))

> 2 * (sum(r*rstar) / sum(rstar^2)) # gamma.hat

[1] -1.473665

> SSna <− sum(r*rstar)^2 / sum(rstar^2)

> SSna   # SSγ

[1] 0.489473

> SSrem <− sum(r^2) - SSna

> SSrem   # SSrem

[1] 1.664410

> Fna <− SSna / (MSrem <− SSrem/5)

> MSrem   # MSrem

[1] 0.3328821

> Fna   # Fna

[1] 1.470409

> pf(Fna, 1, 5, lower.tail=FALSE)   # Pna

[1] 0.2794440

> # When extracting a component from a data frame or a list

> # using $ operator, component's name can be abbreviated

> # by enough number of characters to uniquely identify the

> # component. Thus adhesive$p (see above) extracts

> # component pressure.