Description Usage Arguments Details Value Warning Author(s) References See Also Examples
gencovtest()
tests genetic covariance components from a MANOVA model. Two different approaches can
be used: (I) a test statistic that takes into account the genetic and environmental effects and (II) a test
statistic that only considers the genetic information. The first type refers to tests based on the mean
cross-products ratio, whose distribution is obtained via Monte Carlo simulation of Wishart matrices. The
second way of testing genetic covariance refers to tests based upon an adaptation of Wilks' and Pillai's
statistics for evaluating independence of two sets of variables. All these tests are described by Silva (2015).
1 2 3 4 5 6 7 8 9 10 | ## S3 method for class 'manova'
gencovtest(obj, geneticFactor, gcov = NULL,
residualFactor = NULL, adjNrep = 1,
test = c("MCPR", "Wilks", "Pillai"),
nsim = 9999,
alternative = c("two.sided", "less", "greater"))
## S3 method for class 'gencovtest'
print(x, digits = 4, ...)
## S3 method for class 'gencovtest'
plot(x, var1, var2, ...)
|
obj |
an object of class |
geneticFactor |
a character indicating the genetic factor from which to test covariance components. It must be declared as a factor in the manova object. |
gcov |
optional; a matrix containing estimates of genetic covariances to be tested. If
|
residualFactor |
optional; a character indicating a source in the manova model to be used as
error term. If |
adjNrep |
a correction index for dealing with unbalanced data. See details. |
test |
a character indicating the test. It must be on of the following:
|
nsim |
the number of Monte Carlo simulations. Used only if |
alternative |
the type of alternative hypothesis. Used only if |
x |
an object of class |
digits |
the number of digits to be displayed by the print method. |
var1 |
a character of integer indicating one of the two response variable or its position. |
var2 |
a character of integer indicating one of the two response variable or its position. |
... |
further arguments. |
The genetic covariance matrix is currently estimated via method of moments, following the equation:
G = (Mg - Me) / (nrep * adjNrep)
where Mg and Me are the matrices of mean cross-products associated with the genetic factor and the residuals, respectively; nrep is the number of replications, calculated as the ratio between the total number of observations and the number of levels of the genetic factor; adjNrep is supposed to adjust nrep, specially when estimating G from unbalanced data.
An object of class gencovtest
, a list of
gcov |
a p-dimensional square matrix containing estimates of the genetic covariances. |
gcor |
a p-dimensional square matrix containing estimates of the genetic correlations. |
test |
the test (as input). |
statistics |
a p-dimensional square matrix containing the |
p.values |
a p-dimensional square matrix containing the associated p-values. |
alternative |
the type of alternative hypothesis (as input). |
X2 |
a p-dimensional square matrix containing the Chi-square (D.f. = 1) approximation for Wilks's and Pillai's statistics. Stored only if one of these two tests is chosen. |
simRatio |
an array consisting of |
dfg |
the number of degrees of freedom associated with the genetic factor. |
dfe |
the number of degrees of freedom associated with the residual term. |
When using the MCPR test, be aware that dfg
should be equal or greater than the number of variables (p).
Otherwise the simulation of Wishart matrices may not be done.
A collinearity diagnosis is carried out using the condition number (CN), for the inferences may be affected by the quality of G. Thus, if CN > 100, a warning message is displayed.
Anderson Rodrigo da Silva <anderson.agro@hotmail.com>
Silva, A.R. (2015) On Testing Genetic Covariance. LAP Lambert Academic Publishing. ISBN 3659716553
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # MANOVA
data(maize)
M <- manova(cbind(NKPR, ED, CD, PH) ~ family + env, data = maize)
summary(M)
# Example 1 - MCPR
t1 <- gencovtest(obj = M, geneticFactor = "family")
print(t1)
plot(t1, "ED", "PH")
# Example 2 - Pillai
t2 <- gencovtest(obj = M, geneticFactor = "family", test = "Pillai")
print(t2)
plot(t2, "ED", "PH")
# End (not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.