EvoArt / Hydra.jl

MIT License
0 stars 0 forks source link

Hydra

Build Status Build Status Coverage

PERMANOVA implementation based on the work of McArdle and Anderson. This package aims to provide similar functionality to the adonis2 in the R package vegan. Thus, implementation details are more similar to adonis2 than to the original work by McArdle and Anderson. In keeping with names from mythology, the many headed Lernaean Hydra represents the multivariate response data we aim to tackle here. Though perhaps Heracles or Iolis (the eventual slayers of the Hydra) would be more apt.

drawing

The function function hydra2 expects:

Alternatively, instead of y and metric, pass in a distance matrix D. This function returns a HydraSummary struct when pairs == false and an array of HydraSummarys when pairs == true.

permute accepts a HydraSummary or array thereof, as well al the desired number of permutations. P-values are calculated by simultaneous permutation of rows and columns. If an array is passed in, then an Array will be returned, with pairwise P-values in the lower triangle and the global P-value in the top right. Optionally, when permuting an array of pairwise results, a vector of level names (in lexicographical order) or the full vector/column used as the independent variable in hydra2 may be passed as an argument after the array. This will return a Named array, with appropriate column and row names.