View source: R/canonical-interface.R
| gseg2_graph | R Documentation |
Applies the changed-interval graph scan to a supplied edge matrix.
gseg2_graph(n, E, statistics = "m", l0 = 0.05 * n,
l1 = 0.95 * n, pval.appr = TRUE, skew.corr = TRUE,
pval.perm = FALSE, B = 100)
n |
Number of observations in the sequence. |
E |
Two-column edge matrix for the similarity graph. |
statistics |
Scan statistic or statistics; see |
l0 |
Minimum candidate interval length. |
l1 |
Maximum candidate interval length. |
pval.appr |
Whether to calculate the analytic p-value approximation. |
skew.corr |
Whether to include its skewness correction. |
pval.perm |
Whether to calculate a permutation p-value. |
B |
Number of permutations. |
An interval with boundaries (i, j) contains observations
i + 1, ..., j. When there are r tied maximizing intervals,
tauhat (or tauhat_a/tauhat_u) retains the earlier
layout: its first r entries are the left boundaries and its last
r entries are the corresponding right boundaries. All returned
intervals satisfy the requested length range after the documented endpoint
adjustments. The analytic approximation requires a nonzero length range;
use permutation calibration for a single permitted interval length.
A list containing scan statistics and requested p-values.
Analytic integrations are checked for convergence and finite probability
outputs in [0,1]. An unavailable approximation raises an error rather
than returning an invalid probability. Setting pval.appr = FALSE allows
justified permutation calibration to be used instead. Scan components must be
well-defined on the requested domain; undefined components are not replaced
by zero.
gseg2, gseg_kmst
set.seed(1)
x <- matrix(rnorm(80), nrow = 20)
E <- gseg_kmst(x)
ans <- gseg2_graph(nrow(x), E, pval.appr = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.