gumbel_pvalue {scanstatistics} | R Documentation |
Calculate the Gumbel
-value for a scan statistic.
Description
Given an observed scan statistic and a vector of replicate
scan statistics
,
, fit a Gumbel
distribution to the replicates and calculate a
-value for the observed
statistic based on the fitted distribution.
The function is vectorized, so multiple -values can be calculated if
several scan statistics (e.g. statistics from secondary clusters) are
supplied.
Usage
gumbel_pvalue(observed, replicates, method = "ML", ...)
Arguments
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. |
method |
Either "ML", for maximum likelihood, or "MoM", for method of moments. |
... |
Additional arguments passed to |
Value
The -value or
-values corresponding to the observed
scan statistic(s).