test_multiContrasts: Test multivariate contrasts

Description Usage Arguments Value Note Author(s)

View source: R/test_multiContrasts.R

Description

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.

Usage

1
test_multiContrasts(W, specdata, vars, method = "bonferroni")

Arguments

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 specdata.

method

Correction method for adjusting p-values.

Value

A data frame with the results of each Wilk's lambda test in rows. In columns,

Note

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/.

Author(s)

Raphael Scherrer


rscherrer/sagreicolor documentation built on Dec. 26, 2018, 1:15 p.m.