estimatePDF {PDFEstimator} | R Documentation |
Estimates the probability density function for a data sample.
estimatePDF(sample, pdfLength = NULL, lowerBound = NULL, upperBound = NULL)
sample |
the data sample from which to calculate the density estimate |
pdfLength |
the desired length of the estimate returned. Default value is calculated based on sample length. Overriding this calculation can increase or decrease the resolution of the estimate. |
lowerBound |
the lower bound of the PDF, if known. Default value is calculated based on the range of the data sample. |
upperBound |
the upper bound of the PDF, if known. Default value is calculated based on the range of the data sample. |
A nonparametric density estimator based on the maximum-entropy method. Accurately predicts a probability density function (PDF) for random data using a novel iterative scoring function to determine the best fit without overfitting to the sample.
x |
estimated range of density data |
pdf |
estimated probability density function |
cdf |
estimated cummulative density function |
sqr |
scaled quantile residual. Provides a sample-size invariant measure of the fluctuations in the estimate. |
lagrange |
lagrange multipliers. Can be used to reproduce the expansions for an analytical solution. |
failedSolution |
returns true if the pdf calculated is not considered an acceptable estimate of the data according to the scoring function. |
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 100 sample points using default parameters sampleSize = 1000 sample = rnorm(sampleSize, 0, 1) dist = estimatePDF(sample) plot(dist$x, dist$pdf)