Kernel smoothing cumulative density function (CDF)

Share:

Description

Calculate the kernel smoothing cumulative density function (CDF) of a given sample data at a user-specified value.

Usage

1
  KernelSmoothing.cdf(xx, c0, bw)

Arguments

xx

A numeric vector, sample data.

c0

A numeric value, the cumulative probability for which P(xx<=c_0) will be estimated.

bw

A numeric value indicating the bandwidth used in the kernel smoothing density approximation.

Details

Kernel smoothing is a popular method to approximate a probability density function (PDF) or cumulative density function (CDF). Normal density function is conveniently used in the function as the kernel density and bandwidth is calculated according to the normal reference rule or the Sheather-Jones plug-in method in the package or can be specified arbitrarily by users. For a sample data xx,the cumulative CDF P(xx<= c0) can be approximated by kernel smoothing method as \frac{1}{n}∑_{j=1}^{n}Φ(\frac{xx_j-c_0}{bw}) where n is the sample size of xx.

Value

Return a numeric value—the cumulative probability.

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

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

BW.ref Youden3Grp

Examples

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

##calcualte bandwidth by normal refernce rule 
bw1 <- KernelSmoothing.cdf(xx=x, c0=6, bw=0.1)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.