criticalValuesAll {modehunt}R Documentation

Compute critical values based on the set of all intervals

Description

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

Usage

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, kaspar.rufibach@gmail.com

Guenther Walther, gwalther@stanford.edu,
www-stat.stanford.edu/~gwalther

References

Rufibach, K. and Walther, G. (2007). A general criterion for multiscale inference. Preprint, Department of Statistics, Stanford University.

See Also

The resulting critical values can be used by the function modeHunting. Critical values for some combinations of n and α are available in cvModeAll.

Examples

## 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)

[Package modehunt version 1.0.4 Index]