zVarArrayTest: Variation array homogeneity test

View source: R/zVarArrayTest.R

zVarArrayTestR Documentation

Variation array homogeneity test

Description

This function performs a permutation test of the homogeneity of group-wise and overall variation arrays from all pair-wise log-ratios in a compositional data set. Groups can be defined by either zero/unobserved data patterns or by a grouping factor in fully observed zero-free data sets.

Usage

zVarArrayTest(X, label = 0, groups = NULL, b = 1000)

Arguments

X

Compositional data set (matrix or data.frame class).

label

Unique label (numeric or character) used to denote zeros/unobserved data in X (label = 0, default).

groups

Grouping factor in fully observed zero-free data sets (groups = NULL, default).

b

Number of bootstrap resamples used (b = 1000, default).

Details

The permutation test of homogeneity is based on total weighted squared relative errors (SRE) reflecting on divergence between group-wise variation arrays and overall (see zVarArrayError and zVarArray for more details). Note that for groups including less than two observations SRE is set to NA.

Value

Test p-values for log-ratio variances and means.

See Also

zPatterns, zVarArray, zVarArrayError.

Examples

data(Water)
zPatterns(Water, label = 0)
zVarArrayTest(Water)

zCompositions documentation built on June 22, 2024, 9:46 a.m.