Skip to content

Problem Replicating Venables & Riply Split-Plot Example

2 messages · Rick Bilonick, Brian Ripley

#
I'm using R 1.6.1 under Redhat Linux 8.0. I'm following the example from 
V&R (1994) pp. 177-181. I get the split-plot ANOVA table:

 > summary(oats.aov)

Error: B
          Df  Sum Sq Mean Sq F value Pr(>F)
Residuals  5 15875.3  3175.1

Error: B:V
          Df Sum Sq Mean Sq F value Pr(>F)
V          2 1786.4   893.2  1.4853 0.2724
Residuals 10 6013.3   601.3

Error: Within
          Df  Sum Sq Mean Sq F value    Pr(>F)
Nf         3 20020.5  6673.5 37.6856 2.458e-12 ***
Nf:V       6   321.7    53.6  0.3028    0.9322
Residuals 45  7968.7   177.1
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1


I need to get hold of the residuals and fitted values. The usual way of 
using "resid" and "fitted" doesn't work I guess because this is a 
multistratum model. The "studres" function shows up if I load the MASS 
library. But I cannot get the "proj" and "update" functions to work as 
they do in S-Plus:

 > oats.fm <- update(oats.aov,qr=TRUE)
Error in update.default(oats.aov, qr = TRUE) :
        need an object with call component

How can I get the residuals and fitted values? Wouldn't there be three 
sets of residuals? One for the blocks (6 residuals), one for the 
varieties (18 resduals), and another for the subplots (72 residuals)? If 
we only looked at the varieties and blocks, this would be a randomized 
block design using the average for each plot as the observations. There 
would be 18 residuals. The F-statistic and p-value match the split-plot 
ANOVA results for variety.

Thanks.

Rick B.
#
I don't know how you got oats.aov (or where you got a name similar to mine
from).

Package MASS comes with scripts for the 1999 and 2002 editions which do
what you ask.  I really don't know why you expect code written for 1993
S-PLUS to work unchanged in 2003 R (or 2003 S-PLUS), and suggest you
invest in the current edition.
On Sat, 22 Feb 2003, rab wrote: