Description Usage Arguments Details Value Examples
Estimate a density function using a kernel density estimator with a Gaussian kernel.
1 2 3 4 5 |
x |
A data point, or quantile, at which the kernel density estimator should be evaluated. |
mu |
A vector of data points on which the kernel density estimator is based. |
h |
The kernel density estimator bandwidth. |
The cumulative distribution function is calculated using the numerical integration C code implimented for R's integrate functions, i.e. using Rdqagi. For this approximation, subdiv = 100 (100 subdivisions), and eps_abs = eps_rel = 1e-10, i.e. the absolute and relative errors respectively.
The quantiles of the Gaussian kernel density estimator are calculated using Brent's method. This method requires an interval in which a solution is saught. The objective funcion for which a zero is saught is dkdeGauss-x, where x is the quantile saught. The first interval in which a solution is searched for, corresponds to the range of mu, and is expanded in multiples thereof in consequtive steps. The maximum number of iterations is set at 1000, and the accuracy saught between iterations, is set at 1e-10.
dkdeGauss: The estimated value of the density function at the point x.
pkdeGauss: The estimated value of the cumulative distribution function at the point x.
qkdeGauss: A list with the following components:
result: The xth quantile of the Gaussian kernel density estimator.
value: The value of the cumulative distribution function of the Gaussian kernel density estimator at the xth quantile.
obj.fun: The value of the objective function resulting from Brent's method; should be less than 1e-10.
iterations: Number of iterations for Brent's method in order to achieve the desired accuracy.
steps: Number of range expansions of the search boundaries for Brent's method.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.