calc_mode: Unimodal density estimator when the mode is unknown

Description Usage Arguments Details Value Author(s) References Examples

View source: R/calc_mode.R

Description

Estimates the density of a given sample under the assumption that the underlying density is unimodal. The mode is estimated from the data. The method is based on the unimodal regularization of Birge (1997).

Usage

1

Arguments

x

Vector of independent and identically distributed random variables; must be sorted.

t

A positive real number. Default value is one.

Details

Birge(1997)'s estimator gives a a pieciewise constant unimodal density. The discontinuity points of the respective density are called the knots, which belong to the set of datapoints. The density estimator is constant between two consecutive knots.

t: The parameter t corresponds to the parameter τ in Birge (1997). Higher values of t leads to more accurate estimation of the unimodal densities. This value ontrols the accuracy in unimodal density estimation upto the term n^{-t} where n is the sample size. We recommend a value greater than or equal to one. See Birge (1997) for more details.

Value

Author(s)

Nilanjana Laha (maintainer), nlaha@hsph.harvard.edu, Alex Luedtke, aluedtke@uw.edu.

References

Birge, L. (1997). Estimation of unimodal densities without smoothness assumptions, Ann. Statist., 25, 970–981.

Examples

1
x <- sort(rnorm(100)); calc_mode(x, 1)

nilanjanalaha/SDNNtests documentation built on June 15, 2021, 8:20 p.m.