criticalValuesApprox {modehunt}R Documentation

Compute critical values for (1) the original test statistic with or without additive correction, based on the aprroximating set of intervals and (2) for the block procedure

Description

This function computes critical values that can be used to perform the multiscale analysis about a density with the functions modeHuntingApprox and modeHuntingBlock.

Usage

criticalValuesApprox(n, d0 = 2, m0 = 10, fm = 2, alpha = 0.05, 
        gam = 2, tail = 10, M = 10 ^ 5, display = 0, path = NA)

Arguments

n

Number of observations.

d0

Initial parameter for the grid resolution.

m0

Initial parameter for the number of observations in one block.

fm

Factor by which m is increased from block to block.

alpha

Significance level, real number in (0,1).

gam

Weighting exponent for level in each block.

tail

Offset, determines together with gam the decrease of the level from one block to another.

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 details see the function modeHuntingApprox and the data set cvModeApprox.

Value

approx

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

block

A vector containing the critical value for each block.

Note

The asymptotic results in Rufibach and Walther (2010) are only derived for f_m = 2.

Author(s)

Kaspar Rufibach, kaspar.rufibach@gmail.com,
http://www.kasparrufibach.ch

Guenther Walther, gwalther@stanford.edu,
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.

See Also

The resulting critical values are used by the functions modeHuntingApprox and
modeHuntingBlock. Critical values for some combinations of n and \alpha are available in cvModeApprox and cvModeBlock.

Examples

## compute critical values and compare to those in cvModeAll and cvModeBlock
## (to see output in R, press CTRL + W)
cv <- criticalValuesApprox(n = 200, d0 = 2, m0 = 10, fm = 2, 
     alpha = 0.05, gam = 2, tail = 10, M = 10 ^ 2, display = 1, path = NA)
cv1 <- cv$approx; cv2 <- cv$block

data(cvModeApprox); data(cvModeBlock)
cv3 <- cvModeApprox[cvModeApprox$alpha == 0.05 & cvModeApprox$n == 200, 3:4]
cv4 <- cvModeBlock[cvModeBlock$alpha == 0.05 & cvModeBlock$n == 200, 3:6]
rbind(cv1, cv3)
rbind(cv2, cv4)

[Package modehunt version 1.0.7 Index]