distDataPermute {flintyR}R Documentation

p-value Computation for Test of Exchangeability Using Distance Data

Description

Generates a block permutation p-value.

Usage

distDataPermute(dist_list, nruns, type)

Arguments

dist_list

The list (length B) of pairwise distance data. Each element in list should be either a distance matrix or a table recording pairwise distances.

nruns

The resampling number (use at least 1000)

type

Either an unbiased estimate ('unbiased'), or exact ('valid') p-value (see Hemerik and Goeman, 2018), or both ('both').

Details

Generates a block permutation distribution of V statistic by storing the provided list of distance data as an {N\choose2} \times B array, and then permuting the underlying indices of each individual to generate resampled {N\choose2} \times B arrays. The observed V statistic is also computed from the distance data.

Each element of dist_list should be a N\times N distance matrix.

Dependencies: buildForward, buildReverse, cachePermute

Value

The p-value obtained from comparing the empirical tail cdf of the observed V statistic computed from distance data.


[Package flintyR version 0.1.0 Index]