# criticalValuesAll: Compute critical values based on the set of all intervals In modehunt: Multiscale Analysis for Density Functions

## Description

This function computes critical values that are needed to perform the multiscale analysis about a density using the function `modeHunting`.

## Usage

 `1` ```criticalValuesAll(n, alpha, M, display, path) ```

## Arguments

 `n` Number of observations. `alpha` Significance level, real number in (0,1). `M` Number of runs to perform. `display` If `display == 1`, every 100–th step is indicated in the output window, else not. `path` If `path != NA`, the current number of performed simulations is saved in this location.

## Details

For more details see the function `modeHunting` and the data set `cvModeAll`.

## Value

A 2-dimensional vector containing the critical value for the test statistic with or without additive correction Γ.

## Author(s)

Kaspar Rufibach, [email protected],
http://www.kasparrufibach.ch

Guenther Walther, [email protected],
www-stat.stanford.edu/~gwalther

## References

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

The resulting critical values can be used by the function `modeHunting`. Critical values for some combinations of n and α are available in `cvModeAll`.
 ```1 2 3 4 5 6``` ```## compute critical values and compare to those in cvModeAll ## (to see output in R, press CTRL + W) cv1 <- criticalValuesAll(n = 200, alpha = 0.05, M = 10 ^ 2, display = 1, path = NA) data(cvModeAll) cv2 <- cvModeAll[cvModeAll\$alpha == 0.05 & cvModeAll\$n == 200, 3:4] rbind(cv1, cv2) ```