Calculate the Grenander estimator of a given density vector
Usage
grenader(x, increasing = T)
Arguments
- x
numeric vector representing the density of a histogram
- increasing
logical, whether the Grenander estimator should assume
x is increasing or decreasing
Value
numeric vector with the same length as x
representing the
Grenander estimator of x