View source: R/scanstatistics_general.R
mc_pvalue | R Documentation |
Given an observed scan statistic λ^* and a vector of replicate scan statistics λ_i, i=1,…,R, calculate the Monte Carlo p-value as
\frac{1 + ∑_{i=1}^R \mathrm{I}(λ_i > λ^*)}{1 + R}
The function is vectorized, so multiple p-values can be calculated if several scan statistics (e.g. statistics from secondary clusters) are supplied.
mc_pvalue(observed, replicates)
observed |
A scalar containing the observed value of the scan statistic, or a vector of observed values from secondary clusters. |
replicates |
A vector of Monte Carlo replicates of the scan statistic. |
The p-value or p-values corresponding to the observed scan statistic(s).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.