GAD-package: Analysis of variance from general principles

Description Details Author(s) References See Also Examples

Description

This package contains functions for the analysis of any complex ANOVA models with any combination of orthogonal/nested and fixed/random factors, based on general principles described by Underwood (1997).

Details

Package: GAD
Type: Package
Version: 1.0
Date: 2010-09-14
License: GPL (>= 2.0)

Author(s)

Leonardo Sandrini-Neto (leonardosandrini@gmail.com)
Mauricio G. Camargo (camargo.ufpr@gmail.com)

Maintainer: leonardosandrini@gmail.com

References

Cornfield, J., Tukey, J.W. 1956. Average values of mean squares in factorials. Annals of Mathematical Statistics, 27, 907-949.

Sokal, R.R., Rohlf, F.J. 1995. Biometry: the principles and practice of statistics in biological research. 3rd edition. W. H. Freeman and Co. New York. 887 pp.

Underwood, A.J. 1997. Experiments in Ecology: Their Logical Design and Interpretation Using Analysis of Variance. Cambridge University Press, Cambridge.

See Also

gad, estimates, C.test, snk.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#Example 1
library(GAD)
data(rohlf95)
CG <- as.fixed(rohlf95$cages)
MQ <- as.random(rohlf95$mosquito) 
model <- lm(wing ~ CG + CG%in%MQ, data = rohlf95)
gad(model)
##
##
#Example 2
data(rats)
names(rats)
TR <- as.fixed(rats$treat)
RA <- as.random(rats$rat)
LI <- as.random(rats$liver)
model <- lm(glycog ~ TR + RA%in%TR + LI%in%RA%in%TR, data=rats)
gad(model)
##
##
#Example 3
data(snails)
O <- as.random(snails$origin)
S <- as.random(snails$shore)
B <- as.random(snails$boulder)
C <- as.random(snails$cage)
model <- lm(growth ~ O + S + O*S + B%in%S + O*(B%in%S) + C%in%(O*(B%in%S)), 
            data = snails)
gad(model)

Example output

Loading required package: matrixStats
Loading required package: R.methodsS3
R.methodsS3 v1.7.1 (2016-02-15) successfully loaded. See ?R.methodsS3 for help.
Analysis of Variance Table

Response: wing
         Df  Sum Sq Mean Sq  F value    Pr(>F)    
CG        2  665.68  332.84   1.7409    0.2295    
CG:MQ     9 1720.68  191.19 146.8781 6.981e-11 ***
Residual 12   15.62    1.30                       
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
[1] "glycog" "treat"  "rat"    "liver" 
Analysis of Variance Table

Response: glycog
         Df  Sum Sq Mean Sq F value  Pr(>F)  
TR        2 1557.56  778.78  2.9290 0.19710  
TR:RA     3  797.67  265.89  5.3715 0.01411 *
TR:RA:LI 12  594.00   49.50  2.3386 0.05029 .
Residual 18  381.00   21.17                  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Analysis of Variance Table

Response: growth
          Df  Sum Sq Mean Sq  F value   Pr(>F)   
O          1 118.582 118.582 109.1874 0.001871 **
S          3  36.360  12.120                     
O:S        3   3.258   1.086   6.5359 0.015201 * 
S:B        8   1.187   0.148   0.8927 0.561821   
O:S:B      8   1.329   0.166   1.4177 0.239629   
O:S:B:C   24   2.813   0.117   1.0430 0.413970   
Residual 192  21.576   0.112                     
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

GAD documentation built on May 2, 2019, 3:01 a.m.