monotone_smoother {prevtoinc}R Documentation

Calculate a monotone probability mass function estimate

Description

using a rearrangement or a Grenander estimator as described in Jankoswski, Wellner, 2009 <doi:10.1214/09-EJS526>

Usage

monotone_smoother(values, method = "rear", range = c(1, max(values)))

Arguments

values

observed values of distribution

method

method of estimation "rear" rearrangement or "gren" Grenander

range

boundaries of the support of the distribution

Value

vector of estimated pmf (support of distribution is by default assumed to be min(values):max(values) )

Examples


# 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")


[Package prevtoinc version 0.12.0 Index]