blocks {modehunt} | R Documentation |
In Rufibach and Walther (2007) a new multiscale mode hunting procedure is presented that compares the local test statistics with critical values given by blocks. Blocks are collection of intervals on a given grid that contain roughly the same number of original observations.
blocks(n, m0 = 10, fm = 2)
n |
Number of observations. |
m0 |
Initial parameter that determines the number of observations in one block. |
fm |
Factor by which m is increased from block to block. |
In our block procedure, we only consider a subset mathcal{I}_{app} of all possible intervals mathcal{I}_{all} where
mathcal{I}_{all} = Bigl{(j, k ) : 0 <= j < k <= n+1, k - j > 1Bigr}.
This subset mathcal{I}_{app} is computed as follows:
Set d_1, m_1, f_m > 1. Then:
for r = 1,...,#blocks
d_r := round(d_1 f_m^{(r-1)/2}), m_r := m_1 f_m^{r-1}.
Include (j,k) in mathcal{I}_{app} if
(a) j, k in {1+i d_r, i = 0, 1, ... } (we only consider every d–th observation) and
(b) m_r <= k-j-1 <= 2m_r-1 (mathcal{I}_{jk} contains between m_r and 2m_r - 1 observations)
end for
b times 2–matrix, where b is the number of blocks and the columns contain the lower and the upper number of observations that form each block.
The asymptotic results in Rufibach and Walther (2007) are only derived for f_m = 2.
Kaspar Rufibach, kaspar.rufibach@gmail.com
Guenther Walther, gwalther@stanford.edu,
www-stat.stanford.edu/~gwalther
Rufibach, K. and Walther, G. (2007). A general criterion for multiscale inference. Preprint, Department of Statistics, Stanford University.
This function is called by modeHuntingBlock
.