Description Usage Arguments Details Value Author(s) References Examples
View source: R/Haiman_window_lth.R
This function returns the minimum window length that could be used
in scan statistics hypothesis test with a given significance level.
Here the q-value is approximated by 1-dependent stationary sequences. This
minimum window length also consider the restrictions of input parameters.
1 | Haiman_window_lth(N, p, alpha, lower_wl=3, upper_wl=100)
|
N |
number of Bernoulli trials. |
p |
success probabiliy for each Bernoulli trial under null hypothesis. |
alpha |
hypothesis test significance level. |
lower_wl |
lower bound for searching the minimum window length. |
upper_wl |
upper bound for searching the minimum window length. |
This function is searching for the minimum window length with binary search.
Too small window length is invalid because the alpha level
of the hypothesis is hard to achieve. On the other hand, too large window
length is also not working well. The reason is that with too large window
length, the test losts the power. Also, to detect the embedded clusters,
considering the edge effects, large window length is hard to have a good
performance in general. So, this function has upper searching bound such that
window_lth < N/4.
minimum scan statistics window length for using 1-dependent stationary sequences approximation is returned.
Zhicong Zhao
Haiman,G.(2007), Estimating the distribution of one-dimensional discrete scan statistics viewed as extremes of 1-dependent stationary sequences. Journal of Statistical Planning and Inference, 137(2007), 821-828.
1 | Haiman_window_lth(1000,0.2,0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.