cluster_nhds: Generate null-hypothesis distributions for cluster mass...

View source: R/clustperm.R

cluster_nhdsR Documentation

Generate null-hypothesis distributions for cluster mass statistics

Description

Generate null-hypothesis distributions for cluster mass statistics

Usage

cluster_nhds(n, .data, bin, formula, fn, ...)

Arguments

n

Number of Monte Carlo runs

.data

Data frame.

bin

Unquoted name of variable identifying bins.

formula

Model formula, passed to aov_by_bin.

fn

Unquoted name of function to use for exchanging labels.

...

Arguments to be passed to fn.

Details

Generates null-hypothesis distributions by the following algorithm: For each of the n Monte Carlo runs, (1) randomly permute labels in the dataset according to the relabeling function fn; (2) run aov_by_bin on the resulting data, the result of which is passed to (3) detect_clusters_by_effect, and (4) store the maximum cluster mass statistic for each effect on each run.

Value

A data frame with null-hypothesis distributions for each effect in the column nhd.


dalejbarr/clusterperm documentation built on Oct. 29, 2022, 10:01 p.m.