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).## 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, ...)"manova".NULL (default), an estimate is obtained via method of moments.NULL (default), the usual term "Residuals" will be used."MCPR" - the empirical type-I test based on Mean Cross-Products Ratios via Wishart simulation,
"Wilks" - a type-II test based on the partial Wilks' Lambda,
test = "MCPR".test = "MCPR". So far,
only the option "two.sided" is implemented."gencovtest".gencovtest, a list oftest statistics.
If test = "MCPR" the mean cross-products ratios are computed; if test = "Wilks"
the Wilks' Lambda is; and test = "Pillai" results on Pillai's $Tn$.nsim p-dimensional matrices containing the simulated mean
cross-products ratios.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.manova# 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)Run the code above in your browser using DataLab