Description Usage Arguments Details Value Author(s) References See Also Examples
This function is used to construct the mean squares estimates of an ANOVA design, considering the complications imposed by nested/orthogonal and fixed/random factors.
1 | estimates(object)
|
object |
an object of class lm, containing the specified design with random and/or fixed factors |
Determines what each mean square estimates in an ANOVA design by a set of procedures originally described by Cornfield and Tukey (1956). This version is a modification proposed by Underwood (1997), which does not allow for the use of fixed nested factors. The steps involve the construction of a table of multipliers with a row for each source of variation and a column for each term in the model that is not an interaction. The mean square estimates for each source of variation is obtained by determining which components belong to each mean square and what is their magnitude. This enables the recognition of appropriate F-ratios.
A list of length 3, containing the table of multipliers ($tm), the mean squares estimates ($mse) and the F-ratio versus ($f.versus) for the model.
Leonardo Sandrini-Neto (leonardosandrini@gmail.com)
Cornfield, J., Tukey, J.W. 1956. Average values of mean squares in factorials. Annals of Mathematical Statistics, 27, 907-949.
Underwood, A.J. 1997. Experiments in Ecology: Their Logical Design and Interpretation Using Analysis of Variance. Cambridge University Press, Cambridge.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #Example 1
library(GAD)
data(rohlf95)
CG <- as.fixed(rohlf95$cages)
MQ <- as.random(rohlf95$mosquito)
model_R <- lm(wing ~ CG + CG%in%MQ, data = rohlf95)
estimates(model_R)
##
##
#Example 2
data(snails)
O <- as.random(snails$origin)
S <- as.random(snails$shore)
B <- as.random(snails$boulder)
C <- as.random(snails$cage)
model_C <- lm(growth ~ O + S + O*S + B%in%S + O*(B%in%S) + C%in%(O*(B%in%S)),
data = snails)
estimates(model_C)
|
Loading required package: matrixStats
Loading required package: R.methodsS3
R.methodsS3 v1.8.1 (2020-08-26 16:20:06 UTC) successfully loaded. See ?R.methodsS3 for help.
$tm
CG MQ n
CG 0 4 2
CG:MQ 1 1 2
Res 1 1 1
$mse
Mean square estimates
CG "Res + CG:MQ + CG"
CG:MQ "Res + CG:MQ"
Residual "Res"
$f.versus
F-ratio versus
CG "CG:MQ"
CG:MQ "Residual"
$tm
O S B C n
O 1 4 3 2 5
S 2 1 3 2 5
O:S 1 1 3 2 5
S:B 2 1 1 2 5
O:S:B 1 1 1 2 5
O:S:B:C 1 1 1 1 5
Res 1 1 1 1 1
$mse
Mean square estimates
O "Res + O:S:B:C + O:S:B + O:S + O"
S "Res + O:S:B:C + O:S:B + S:B + O:S + S"
O:S "Res + O:S:B:C + O:S:B + O:S"
S:B "Res + O:S:B:C + O:S:B + S:B"
O:S:B "Res + O:S:B:C + O:S:B"
O:S:B:C "Res + O:S:B:C"
Residual "Res"
$f.versus
F-ratio versus
O "O:S"
S "No test"
O:S "O:S:B"
S:B "O:S:B"
O:S:B "O:S:B:C"
O:S:B:C "Residual"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.