BrVitale {bde} | R Documentation |
Class "BrVitale"
Description
This class deals with bias reduced version of Vitale (1975) Bernstein Polynomial approximation as described in Leblanc (2009). The polynomial estimator is computed using the provided data samples. Using this polynomial 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 from the Class
Objects can be created by using the generator function brVitale
.
Slots
dataPointsCache
:a numeric vector containing points within the
[lower.limit,upper.limit]
intervaldensityCache
: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 estimatorm
:the order of the polynomial approximation
M
:a numeric parameter for bias reduction. Usually this parameter is set to
m/2
since it leads to optimal MISE (mean integrated squared error) propertieslower.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
Methods
- density
See
"density"
for details- distribution
See
"distribution"
for details- quantile
See
"quantile"
for details- rsample
See
"rsample"
for details- plot
See
"plot"
for details- getdataPointsCache
See
"getdataPointsCache"
for details- getdensityCache
See
"getdensityCache"
for details- getdistributionCache
See
"getdistributionCache"
for details- getdataPoints
See
"getdataPoints"
for details- getm
See
"getm"
for details- getM
See
"getM"
for details
Author(s)
Guzman Santafe, Borja Calvo and Aritz Perez
References
Vitale, R. A. (1975). A Bernstein polynomial approach to density function estimation. tatistical Inference and Related Topics, 2, 87-99.
Leblanc, A. (2010). A bias-reduced approach to density estimation using Bernstein polynomials. Journal of Nonparametric Statistics, 22(4), 459-475.
Examples
# create the model
model <- brVitale(dataPoints = tuna.r, m = 25, M = 25/2)
# examples of usual functions
density(model,0.5)
distribution(model,0.5,discreteApproximation=FALSE)
# graphical representation
hist(tuna.r,freq=FALSE,main="Tuna Data")
lines(model, col="red",lwd=2)
# graphical representation using ggplot2
graph <- gplot(model,show=TRUE,includePoints=TRUE)