Learn R Programming

sROC (version 0.1-2)

bw.CDF: Bandwidth Selectors for Kernel CDF Estimation

Description

Rule-of-thumb bandwidth selectors for kernel CDF estimation using the normal CDF or PDF reference approach.

Usage

bw.CDF(x, method="npdf")

Arguments

x
numeric vector.
method
either ``npdf'' (the normal PDF reference approach) or ``ncdf'' (the normal CDF reference approach).

Value

A bandwidth on a scale suitable for the bw argument of kCDF.

Details

bw.CDF implements a rule-of-thumb for choosing the bandwidth of a Gaussian kernel CDF estimator.

References

Altman, N., and Leger, C. (1995). Bandwidth selection for kernel distribution function estimation. Journal of Statistical Planning and Inference, 46, 195-214.

See Also

kCDF, bw.CDF.pi.

Examples

Run this code

set.seed(100)
n <- 200
x <- c(rnorm(n/2, mean=-2, sd=1), rnorm(n/2, mean=3, sd=0.8))
bw.CDF(x, method="npdf")
bw.CDF(x, method="ncdf")

Run the code above in your browser using DataLab