check_normality: Test normality across groups

Description Usage Arguments Value Author(s)

View source: R/check_normality.R

Description

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

Usage

1
check_normality(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 list with one element per dependent variable. Each element is a data frame with Shapiro's W statistic, its P-value and adjusted P-value for each group (island-habitat combination). 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 Dec. 26, 2018, 1:15 p.m.