MicroBetaChen99Kernel | R Documentation |
"MicroBetaChen99Kernel"
This class deals with the kernel-wise normalization of the Chen's 99 Kernel estimator (as described in Gourierous and Monfort, 2006). 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.
Objects can be created by using the generator function microBetaChen99Kernel
.
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
modified
:if TRUE
, the modified version of the kernel estimator is used
normalizationConstants
:this slot is used to save the kernel-wise normalization constants. It is only for internal use
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 "getmodified"
for details
Guzman Santafe, Borja Calvo and Aritz Perez
Chen, S. X. (1999). Beta kernel estimators for density functions. Computational Statistics & Data Analysis, 31, 131-145.
Gourieroux, C. and Monfort, A. (2006). (Non) consistency of the Beta Kernel Estimator for Recovery Rate Distribution. Working Paper 2006-31, Centre de Recherche en Economie et Statistique.
# create the model kernel.noModified <- microBetaChen99Kernel(dataPoints = tuna.r, b = 0.01, modified = FALSE) kernel.Modified <- microBetaChen99Kernel(dataPoints = tuna.r, b = 0.01, modified = TRUE) # examples of usual functions density(kernel.noModified,0.5) density(kernel.Modified,0.5) distribution(kernel.noModified,1,discreteApproximation=FALSE) distribution(kernel.noModified,1,discreteApproximation=TRUE) distribution(kernel.Modified,1,discreteApproximation=FALSE) distribution(kernel.Modified,1,discreteApproximation=TRUE) # graphical representation hist(tuna.r,freq=FALSE,main="Chen99 Kernels Tuna Data") lines(kernel.noModified, col="red",lwd=2) lines(kernel.Modified,col="blue",lwd=2) # graphical representation using ggplot2 graph <- gplot(list("noModified"=kernel.noModified, "modified"=kernel.Modified), show=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.