gad {GAD} | R Documentation |
General analysis of variance design
Description
Fits a general ANOVA design with any combination of orthogonal/nested and fixed/random factors through function estimates
.
Usage
gad(object, quasi.f = FALSE)
Arguments
object |
an object of class lm, containing the specified design with random and/or fixed factors. |
quasi.f |
logical, indicating whether to use quasi F-ratio when there is no single error term appropriate in the analysis. Default to |
Details
Function gad
returns an analysis of variance table using estimates
to identify the appropriate F-ratios and consequently p-values for any complex model of orthogonal or nested, fixed or random factors as described by Underwood(1997).
Value
A "list
" containing an object of class "anova"
inheriting from class "data.frame"
.
Author(s)
Leonardo Sandrini-Neto (leonardosandrini@ufpr.br)
References
Underwood, A.J. 1997. Experiments in Ecology: Their Logical Design and Interpretation Using Analysis of Variance. Cambridge University Press, Cambridge.
See Also
Examples
# Example 1
library(GAD)
data(rohlf95)
CG <- as.fixed(rohlf95$cages)
MQ <- as.random(rohlf95$mosquito)
model <- lm(wing ~ CG + MQ%in%CG, data = rohlf95)
model.tab <- gad(model)
model.tab
# Example 2
data(rats)
TR <- as.fixed(rats$treat)
RA <- as.random(rats$rat)
LI <- as.random(rats$liver)
model2 <- lm(glycog ~ TR + RA%in%TR + LI%in%RA%in%TR, data = rats)
model2.tab <- gad(model2)
model2.tab
# Example 3
data(snails)
O <- as.random(snails$origin)
S <- as.random(snails$shore)
B <- as.random(snails$boulder)
C <- as.random(snails$cage)
model3 <- lm(growth ~ O + S + O*S + B%in%S + O*(B%in%S) + C%in%(O*(B%in%S)), data = snails)
model3.tab <- gad(model3)
model3.tab # 'no test' for shore
model3.tab2 <- gad(model3, quasi.f = TRUE)
model3.tab2 # suitable test for shore