check_multinorm: Test multivariate normality across groups

Description Usage Arguments Value Author(s)

View source: R/check_multinorm.R

Description

This function tests for multivariate normality of the data across groups (island-habitat combinations). If performs multiple Shapiro-Wilk's multivariate normality tests. P-values are adjusted to account for multiple testing.

Usage

1
check_multinorm(specdata, vars, plotit = T, method = "bonferroni")

Arguments

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.

plotit

Logical. Whether to plot adjusted P-values.

method

A character, the method used for P-value correction. See ?p.adjust.

Value

A data frame with each group, its multivariate normality W statistic, P-value and adjusted P-value. If plotit = T, also returns a bar plot of the adjusted P-values with a dashed line at 0.05.

Author(s)

Raphael Scherrer


rscherrer/sagreicolor documentation built on May 26, 2019, 12:32 p.m.