[R] Nested Designs

Alan T. Arnholt arnholt at math.appstate.edu
Mon Nov 8 17:47:05 CET 1999


On 08 Nov 1999 17:24:49 +0100 Peter Dalgaard BSA 
<p.dalgaard at biostat.ku.dk> wrote:

> "Alan T. Arnholt" <arnholt at math.appstate.edu> writes:
> 
> > > summary(aov(Strain~Machine + Head%in%Machine ))
> >              Df Sum Sq Mean Sq F value  Pr(>F)  
> > Machine       4  45.07   11.27  1.0532 0.38762  
> > Machine:Head 15 282.87   18.86  1.7625 0.06252 .
> > Residuals    60 642.00   10.70    
> > 
> > the F value to test "Machine" uses the MS residual 
> > instead of MS Head(Machine).
> > 
> > When I use the following no F value is reported
> > 
> > > summary(aov(Strain~Machine + Head%in%Machine + Error(Machine)))
> > 
> > Error: Machine
> >         Df Sum Sq Mean Sq
> > Machine  4 45.075  11.269
> > 
> > Error: Within
> >              Df Sum Sq Mean Sq F value  Pr(>F)  
> > Machine:Head 15 282.88   18.86  1.7625 0.06252 .
> > Residuals    60 642.00   10.70  
> > 
> > Is the second approach the best I can do?
> 
> Hmm. You're not giving us any data to try it on, but I think I'd have
> 
> aov(Strain~Machine + Error(Machine:Head))
> 
> -- 
>    O__  ---- Peter Dalgaard             Blegdamsvej 3  
>   c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
>  (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907

Peter,

Here is the data I am using:

> strain
   Strain Head Machine
1       6    A       A
2       2    A       A
3       0    A       A
4       8    A       A
5      13    B       A
6       3    B       A
7       9    B       A
8       8    B       A
9       1    C       A
10     10    C       A
11      0    C       A
12      6    C       A
13      7    D       A
14      4    D       A
15      7    D       A
16      9    D       A
17     10    A       B
18      9    A       B
19      7    A       B
20     12    A       B
21      2    B       B
22      1    B       B
23      1    B       B
24     10    B       B
25      4    C       B
26      1    C       B
27      7    C       B
28      9    C       B
29      0    D       B
30      3    D       B
31      4    D       B
32      1    D       B
33      0    A       C
34      0    A       C
35      5    A       C
36      5    A       C
37     10    B       C
38     11    B       C
39      6    B       C
40      7    B       C
41      8    C       C
42      5    C       C
43      0    C       C
44      7    C       C
45      7    D       C
46      2    D       C
47      5    D       C
48      4    D       C
49     11    A       D
50      0    A       D
51      6    A       D
52      4    A       D
53      5    B       D
54     10    B       D
55      8    B       D
56      3    B       D
57      1    C       D
58      8    C       D
59      9    C       D
60      4    C       D
61      0    D       D
62      8    D       D
63      6    D       D
64      5    D       D
65      1    A       E
66      4    A       E
67      7    A       E
68      9    A       E
69      6    B       E
70      7    B       E
71      0    B       E
72      3    B       E
73      3    C       E
74      0    C       E
75      2    C       E
76      2    C       E
77      3    D       E
78      7    D       E
79      4    D       E
80      0    D       E

Your suggestion gives
> summary(aov(Strain~Machine + Head%in%Machine + Error(Machine:Head)))

Error: Machine:Head
             Df  Sum Sq Mean Sq
Machine       4  45.075  11.269
Machine:Head 15 282.875  18.858

Error: Within
          Df Sum Sq Mean Sq F value Pr(>F)
Residuals 60  642.0    10.7    

Unfortunately no F-values.....

ALAN
___________________________
Alan T. Arnholt
Office phone: (828) 262 - 2863
Office fax  : (828) 265 - 8617

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list