jaccard: Paired or longitudinal Jaccard distances

Description Usage Arguments Value

View source: R/pl_jaccard.R

Description

The distances are calculated as follows, where d_k^X is the within-subject measure of change appropriate to the setting (paired/longitudinal and quantitative/qualitative), as described in the full package documentation and vignette. Paired, qualitative: D_{AB} = 1 - {∑_k I(d_k^A = d_k^B) I(d_k^A \neq 0)}/{∑_k [I(d_k^A \neq 0) + I(d_k^B \neq 0)]} Paired, quantitative: D_{AB} = 1 - {∑_k \min(|d_k^A|, |d_k^B|) \, I(sgn(d_k^A) = sgn(d_k^B))}/{∑_k \max(|d_k^A|, |d_k^b|)} Longitudinal: D_{AB} = 1 - (∑_k \min(d_k^A, d_k^B))/(∑_k \max(d_k^A, d_k^B))

Usage

1
jaccard(tsf.data, paired, binary)

Arguments

tsf.data

Transformed OTU table and metadata (from function pl.transform)

paired

Logical indicating whether paired analysis is desired

binary

Logical indicating whether to use the binary version of the distance

Value

Returns an n x n distance matrix.


aplantin/pldist documentation built on Feb. 26, 2021, 2:19 p.m.