Learn R Programming

PDFEstimator (version 4.5)

approximatePoints: Approximate Data Points

Description

Returns additional point estimates based on an existing estimate.

Usage

approximatePoints(estimate, estimationPoints)

Value

No return value, called for side effects

Arguments

estimate

the pdfe object returned from estimatePDF or convertToPDFe

estimationPoints

a vector of additional points to estimate.

Author

Jenny Farmer, Donald Jacobs

Details

This method approximates density estimates for the points specified by performing a linear interpolation on an existing probability density function. For a more precise point estimation, call estimatePDF with the estimationPoints argument.

References

Farmer, J. and D. Jacobs (2018). "High throughput nonparametric probability density estimation." PLoS One 13(5): e0196937.

Examples

Run this code
#Estimates a normal distribution with 1000 sample points using default
# parameters, then prints approximate probability density at points -3, 0, and 1
  
sampleSize = 1000
sample = rnorm(sampleSize, 0, 1)
dist = estimatePDF(sample)
approximatePoints(dist, c(-3, 0, 1))

Run the code above in your browser using DataLab