This class deals with 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 can be created by using the generator function
a numeric vector containing points within the
a numeric vector containing the density for each point in
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
a numeric vector containing data samples within the
[lower.limit,upper.limit] interval. These data samples are used to obtain the kernel estimator
the order of the polynomial approximation
a numeric value for the lower limit of the bounded interval for the data
a numeric value for the upper limit of the bounded interval for the data
"density" for details
"distribution" for details
"quantile" for details
"rsample" for details
"plot" for details
"getdataPointsCache" for details
"getdensityCache" for details
"getdistributionCache" for details
"getdataPoints" for details
"getm" for details
Guzman Santafe, Borja Calvo and Aritz Perez
Vitale, R. A. (1975). A Bernstein polynomial approach to density function estimation. Statistical 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# create the model model <- vitale(dataPoints = tuna.r, m = 25) # 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.