BW.ref: Calculate the bandwidth (normal reference rule and...

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

Description

Calculate the bandwidth in kernel smoothing for density estimation by use of normal reference rule and by Sheather-Jones plug-in method.

Usage

1
BW.ref(x, method = "KS-SJ")

Arguments

x

a numeric vector, e.g., a diagnostic test's measurments.

method

specify which method to be used for bandwidth calculation for kernel smoothing density estimation in the extended Youden index estimation. The method choices include: “KS”–uses the simple normal reference rule; “KS-SJ”–uses the Sheather-Jones plug-in method which used the 2-stage solve-the-equation rules calling the R package KernSmooth (see references).

Details

Kernel smoothing estimation of density function requires specification of kernel function and bandwidth. Normal density is conveniently used as the kernel. Bandwidth selection is important in density estimation.

The normal reference rule calculates the bandwidth as 1.06*min(sd,iqr/1.34)n^{-0.2} with sd and iqr indicating the standard deviation and inter-quartile range. The Sheather and Jones direct plug-in bandwidth estimator (JRSSB, 1991) is obtained by using the R package KernSmooth.

Value

Return a numeric value, the calculated bandwidth for kernel smoothing estimate on sample data x.

Note

Bug reports, malfunctioning, or suggestions for further improvements or contributions can be sent to Jingqin Luo <rosy@wubios.wustl.edu>.

Author(s)

Jingqin Luo

References

Sheather, S.J. and Jones, M.C. (1991) A reliable data-based bandwidth selection method for kernel density estimation. Journal of Royal Statistical Society (Serie B) 53 683–690

Sheather, S.J. (1992) The performance of six popular bandwidth selection methods on some real datasets. Computational Statistics 7 225–250.

Silverman, B.W. (1986) Density Estimation for Statistics and Data Analysis. Chapman & Hall.

Wasserman, L. (2005) All of Statistics: A Concise Course in Statistical Inference. Springer

See Also

Youden3Grp KernelSmoothing.cdf

Examples

1
2
3
4
5
6
7
8
###generate data
x <- rnorm(100, 10, 1.5)

##calcualte bandwidth by normal refernce rule 
bw1 <- BW.ref(x=x, method="KS")

##calcualte bandwidth by Sheather-Jones plug-in method 
bw2 <- BW.ref(x=x, method="KS-SJ")

DiagTest3Grp documentation built on April 14, 2017, 5:53 p.m.