Muller91BoundaryKernel | R Documentation |
"Muller91BoundaryKernel"
This class deals with Kernel estimators for bounded densities using boundary kernel described in Muller (1991). The kernel estimator is computed using the provided data samples. Using this kernel estimator, the methods implemented in the class can be used to compute densities, values of the distribution function, quantiles, sample the distribution and obtain graphical representations. Note that this kernel estimator is not normalized and therefore it is not a probability distribution (the cumulative density function may return values greater than 1).
Objects can be created by using the generator function muller91BoundaryKernel
.
dataPointsCache
:a numeric vector containing points within the [lower.limit,upper.limit]
interval
densityCache
:a numeric vector containing the density for each point in dataPointsCache
distributionCache
:a numeric vector used to cache the values of the distribution function. This slot is included to improve the performance of the methods when multiple calculations of the distribution function are used
dataPoints
:a numeric vector containing data samples within the [lower.limit,upper.limit]
interval. These data samples are used to obtain the kernel estimator
b
:the bandwidth of the kernel estimator
mu
:a integer value indicating the degree of smoothness for the boundary kernel. mu
can take the following values: 0 (uniform kernel), 1 (Epanechnikov kernel), 2 (biweight kernel) or 3 (triweight kernel)
lower.limit
:a numeric value for the lower limit of the bounded interval for the data
upper.limit
:a numeric value for the upper limit of the bounded interval for the data
See "density"
for details
See "distribution"
for details
See "quantile"
for details
See "rsample"
for details
See "plot"
for details
See "getdataPointsCache"
for details
See "getdensityCache"
for details
See "getdistributionCache"
for details
See "getdataPoints"
for details
See "getb"
for details
See "getmu"
for details
Guzman Santafe, Borja Calvo and Aritz Perez
Muller, H. (1991). Smooth optimum kernel estimators near endpoints. Biometrika, 78(3), 521-530.
# create the model kernel <- muller91BoundaryKernel(dataPoints = tuna.r, b = 0.01, mu = 2) # examples of usual functions density(kernel,0.5) distribution(kernel,0.5,discreteApproximation=FALSE) # graphical representation hist(tuna.r,freq=FALSE,main="Tuna Data") lines(kernel, col="red",lwd=2) # graphical representation using ggplot2 graph <- gplot(kernel, show=TRUE, includePoints=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.