View source: R/estimationfunctions.R
| monotone_smoother | R Documentation |
using a rearrangement or a Grenander estimator as described in Jankoswski, Wellner, 2009 <doi:10.1214/09-EJS526>
monotone_smoother(values, method = "rear", range = c(1, max(values)))
values |
observed values of distribution |
method |
method of estimation "rear" rearrangement or "gren" Grenander |
range |
boundaries of the support of the distribution |
vector of estimated pmf (support of distribution is by default assumed to be min(values):max(values) )
# generate sample from geometric distribution
A <- rgeom(50, 0.2)
# plot empirical probability mass function
plot(epmf(A))
dist.A.gren <- monotone_smoother(A, method = "gren")
# plot estimated probability mass function
points(dist.A.gren, col = "red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.