Compute the clustermass test correction given a matrix a permuted statistical signals.

compute_clustermass(distribution, threshold, aggr_FUN, alternative = "greater")

Arguments

distribution

A matrix of permuted statistical signal. The first row indicating the observed statistics.

threshold

A scalar that respresents the threshold to create the clusters.

aggr_FUN

A function to compute the clustermasses. See details for examples.

alternative

A character string indicating the alternative hypothesis. Default is "greater". Choose between "greater", "less" or "two.sided".

Details

The aggr_FUN argument may take predefined function as the sum: aggr_FUN = sum and also user-defined function as the sum of squares: aggr_FUN = function(x){sum(x^2)}