Learn R Programming

modehunt (version 1.0.8)

modeHunting: Multiscale analysis of a density on all possible intervals

Description

Simultanous confidence statements for the existence and location of local increases and decreases of a density f, computed on all intervals spanned by two observations.

Usage

modeHunting(X.raw, lower = -Inf, upper = Inf, crit.vals, min.int = FALSE)

Value

Dp

The set \(\mathcal{D}^+(\alpha)\) (or \(\bf{D}^+(\alpha)\)), based on the test statistic with additive correction \(\Gamma\).

Dm

The set \(\mathcal{D}^-(\alpha)\) (or \(\bf{D}^-(\alpha)\)), based on the test statistic with \(\Gamma\).

Dp.noadd

The set \(\mathcal{D}^+(\alpha)\) (or \(\bf{D}^+(\alpha)\)), based on the test statistic without \(\Gamma\).

Dm.noadd

The set \(\mathcal{D}^+(\alpha)\) (or \(\bf{D}^-(\alpha)\)), based on the test statistic without \(\Gamma\).

Arguments

X.raw

Vector of observations.

lower

Lower support point of \(f\), if known.

upper

Upper support point of \(f\), if known.

crit.vals

2-dimensional vector giving the critical values for the desired level.

min.int

If min.int = TRUE, the set of minimal intervals is output, otherwise all intervals with a test statistic above the critical value are given.

Details

In general, the methods modeHunting, modeHuntingApprox, and modeHuntingBlock compute for a given level \(\alpha \in (0, 1)\) and the corresponding critical value \(c_{jk}(\alpha)\) two sets of intervals

$$\mathcal{D}^\pm(\alpha) = \Bigl\{ \mathcal{I}_{jk} \ : \ \pm T_{jk}({\bf{X}} ) > c_{jk}(\alpha) \Bigr\}$$

where \(\mathcal{I}_{jk}:=(X_{(j)},X_{(k)})\) for \(0\le j < k \le n+1, k-j> 1\) and \(c_{jk}\) are appropriate critical values.

Specifically, the function modeHunting computes \(\mathcal{D}^\pm(\alpha)\) based on the two test statistics

$$T_n^+({\bf{X}}, \mathcal{I}) = \max_{(j,k) \in \mathcal{I}} \Bigl( |T_{jk}({\bf{X}})| / \sigma_{jk} - \Gamma \Bigl(\frac{k-j}{n+2}\Bigr)\Bigr)$$

and

$$T_n({\bf{X}}, \mathcal{I}) = \max_{(j,k) \in \mathcal{I}} ( |T_{jk}({\bf{X}})| / \sigma_{jk} ),$$

using the set \(\mathcal{I} := \mathcal{I}_{all}\) of all intervals spanned by two observations \((X_{(j)}, X_{(k)})\):

$$\mathcal{I}_{all} = \Bigl\{(j, \ k ) \ : \ 0 \le j < k \le n+1, \ k - j > 1\Bigr\}.$$

We introduced the local test statistics

$$T_{jk}({\bf{X}}) := \sum_{i=j+1}^{k-1} ( 2 X_{(i; j, k)} - 1) 1\{X_{(i; j, k)} \in (0,1)\},$$

for local order statistics

$$X_{(i; j, k)} := \frac{X_{(i)}-X_{(j)}}{X_{(k)} - X_{(j)}},$$

the standard deviation \(\sigma_{jk} := \sqrt{(k-j-1)/3}\) and the additive correction term \(\Gamma(\delta) := \sqrt{2 \log(e / \delta)}\) for \(\delta > 0\).

If min.int = TRUE, the set \(\mathcal{D}^\pm(\alpha)\) is replaced by the set \({\bf{D}}^\pm(\alpha)\) of its minimal elements. An interval \(J \in \mathcal{D}^\pm(\alpha)\) is called minimal if \(\mathcal{D}^\pm(\alpha)\) contains no proper subset of \(J\). This minimization post-processing step typically massively reduces the number of intervals. If we are mainly interested in locating the ranges of increases and decreases of \(f\) as precisely as possible, the intervals in \(\mathcal{D}^\pm(\alpha) \setminus \bf{D}^\pm(\alpha)\) do not contain relevant information.

References

Duembgen, L. and Walther, G. (2008). Multiscale Inference about a density. Ann. Statist., 36, 1758--1785.

Rufibach, K. and Walther, G. (2010). A general criterion for multiscale inference. J. Comput. Graph. Statist., 19, 175--190.

See Also

modeHuntingApprox, modeHuntingBlock, and cvModeAll.

Examples

Run this code
## for examples type
help("mode hunting")
## and check the examples there

Run the code above in your browser using DataLab