View source: R/approximatePoints.R
approximatePoints | R Documentation |
Returns additional point estimates based on an existing estimate.
approximatePoints(estimate, estimationPoints)
estimate |
the pdfe object returned from estimatePDF or convertToPDFe |
estimationPoints |
a vector of additional points to estimate. |
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.
No return value, called for side effects
Jenny Farmer, Donald Jacobs
Farmer, J. and D. Jacobs (2018). "High throughput nonparametric probability density estimation." PLoS One 13(5): e0196937.
#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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.