Learn R Programming

bde (version 1.0.1)

vitale: Vitale generator method

Description

User friendly constructor method for Vitale objects.

Usage

vitale(dataPoints, m=round(length(dataPoints)^(2/5)), dataPointsCache=NULL, 
        lower.limit = 0, upper.limit = 1)

Arguments

dataPoints

a numeric vector containing data samples within the [lower.limit,upper.limit] interval. These data samples are used to obtain the kernel estimator

m

a integer value indicating the order of the polynomial approximation. m must take values greater than 0

dataPointsCache

a numeric vector containing points within the [lower.limit,upper.limit] interval. These points are used for convenience to cache density and distribution values. If dataPointsCache=NULL the values are initialized to a sequence of 101 equally spaced values from lower.limit to upper.limit

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. That is, the data is with the [lower.limit,upper.limit] interval

Details

See '>Vitale class for more details.

References

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.

Examples

Run this code
# 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)

Run the code above in your browser using DataLab