pvalue: Calculate permutation p-value from null-hypothesis...

View source: R/clustperm.R

pvalueR Documentation

Calculate permutation p-value from null-hypothesis distribution

Description

Calculate permutation p-value from null-hypothesis distribution

Usage

pvalue(cms, nhd)

Arguments

cms

Cluster mass statistic for the original data.

nhd

A vector comprising the null-hypothesis distribution, excluding the original statistic.

Details

Calculates the p-value as the number of values in the vector c(cms, nhd) that are greater than or equal to the original value, divided by the length of nhd plus one (because the original statistic is included in the NHD).

Value

A scalar representing the p-value.


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