Description Usage Arguments Value Note Author(s)
View source: R/test_multiContrasts.R
This function tests for significant contrasts between multivariate habitat-means within islands. The procedure is parametric and involves calculation of Wilk's lambda and P-value adjustment.
1 | test_multiContrasts(W, specdata, vars, method = "bonferroni")
|
W |
A matrix indicating all contrasts to be tested, or a vector if only one contrast. The number of rows is the number of contrasts to test. The number of columns is the number of groups. The matrix/vector is filled with zeros, except for a 1 and a -1 at the position of the groups that are to be contrasted. |
specdata |
A data frame containing at least columns for the dependent variables, as well as a column "island" and a column "habitat". |
vars |
A character or integer vector. The names, or indices, of the dependent variables in |
method |
Correction method for adjusting p-values. |
A data frame with the results of each Wilk's lambda test in rows. In columns,
hab1
, hab2
Habitats being compared.
Wilks
Wilk's lambda.
approx.F
F-value computed from Wilk's lambda.
df1
, df2
Numerator and denominator degrees of freedom of the F distribution.
p.value
P-value computed from the F-distribution.
p.adj
Corrected P-value.
The parametric procedure was adapted from Charles Zaiontz's post on multivariate contrast testing in Excel: http://www.real-statistics.com/multivariate-statistics/multivariate-analysis-of-variance-manova/manova-follow-up-contrasts/.
Raphael Scherrer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.