HRR_bstp_lb: Hazard Rate Ratio Bootstrapping Confidence Interval

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/HRR_bstp_lb.R

Description

This function estimates hazard rate ratio bootstrapping confidence interval of U(0,1) random variables.

Usage

1
2
HRR_bstp_lb(N, pt_int, kernel = "gaussian", hazard_bandwidth = NULL,
            knn = NULL, mc_rep, c_l, est_fun, ...)

Arguments

N

length of sequence

pt_int

a vector of estimated points.

kernel

a character string giving the smoothing kernel to be used. This must partially match one of "gaussian", "rectangular", "triangular" or "knn", with default "gaussian".

hazard_bandwidth

the smoothing bandwidth to be used.

knn

number of neighbor points to be considered in smoothing for the "knn" kernel.

mc_rep

number of replicates.

c_l

one side significance level.

est_fun

a character string giving the hazard rate ratio estimation function. This must match with either "pt" or "sbsp".

...

further arguments for "sbsp".

Details

In scan statistics hypothesis, null hypothesis has success probability equals to a given constant p. However, in this anomaly detection, with hazard rate ratio adjustment, p is a function with respect to hazard rate ratio estimation. To eliminate the false positive clusters caused by the variance of this estimation, we present to tune down the p by the return of this function. This can guarantee that real success probability is not greater than p with probability c_l.

As the N large enough, the return is close to 1. Considering the efficiency of the function, it is not always necessary to apply this function before using functions this anomaly detection package.

Value

This function returns the

1/ max(hazard rate ratio)

for significance level equals to c_l

Author(s)

Zhicong Zhao

See Also

HRR_pt_est and HRR_sbsp_est for details of hazard rate ratio estimation function.

Examples

1
2
3
4
5
6
7
8
9
## HRR_sbsp_est is faster than HRR_pt_est
# system.time({HRR_bstp_lb(600, seq(0,1,0.1),
#              hazard_bandwidth = 0.1, mc_rep = 100, c_l = 0.05,
#              est_fun = "pt")}) ## HRR_pt_est

# system.time({HRR_bstp_lb(600, seq(0,1,0.1),
#              hazard_bandwidth = 0.1, mc_rep = 100, c_l = 0.05,
#              est_fun = "sbsp", n_hz_sample = 30,
#              n_hz_size = 50)}) ## HRR_sbsp_est

zhicongz/AnomDetct documentation built on Dec. 12, 2019, 9:16 a.m.