create_comparison_matrix: Creates row-wise perturbations of compositions from the mean...

View source: R/create_comparison_matrix.R

create_comparison_matrixR Documentation

Creates row-wise perturbations of compositions from the mean composition

Description

Creates row-wise perturbations of compositions from the mean composition

Usage

create_comparison_matrix(comparisons, comps, mean_comps)

Arguments

comparisons

currently two choices: "one-v-one" or "prop-realloc" (default).

comps

the names (character vector) of the compositional variables

mean_comps

the mean composition of comps

Details

comparisons = "one-v-one" creates a matrix with length(comps) columns and length(comps) * (length(comps) - 1) rows. The rows contain all pairs of variables with 1 and -1 values.

comparisons = "prop-realloc" creates a matrix with length(comps) columns and length(comps) rows. Each rows contains a 1 value for a compositional variable and the remaining values sum to -1 proportional to the mean_comps value for those variables.

Note that for both comparisons options the net change is 0 (each row sums to 0).


tystan/deltacomp documentation built on Oct. 26, 2022, 7:24 a.m.