Description Usage Arguments Details Value Note Author(s) References See Also Examples
Calculate the kernel smoothing cumulative density function (CDF) of a given sample data at a user-specified value.
1 | KernelSmoothing.cdf(xx, c0, bw)
|
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. |
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.
Return a numeric value—the cumulative probability.
Bug reports, malfunctioning, or suggestions for further improvements or contributions can be sent to Jingqin Luo <rosy@wubios.wustl.edu>.
Jingqin Luo
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.