criticalValuesApprox {modehunt} | R Documentation |
This function computes critical values that can be used to perform the multiscale analysis about a
density with the functions modeHuntingApprox
and modeHuntingBlock
.
criticalValuesApprox(n, d0 = 2, m0 = 10, fm = 2, alpha = 0.05, gam = 2, tail = 10, M = 10 ^ 5, display = 0, path = NA)
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. |
For details see the function modeHuntingApprox
and the data set cvModeApprox
.
approx |
A 2-dimensional vector containing the critical value for the test statistic with or without additive correction Γ. |
block |
A vector containing the critical value for 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.
The resulting critical values are used by the functions modeHuntingApprox
and
modeHuntingBlock
. Critical values
for some combinations of n and α are available in cvModeApprox
and
cvModeBlock
.
## 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)