Density and dstribution function for a log-concave distribution.
dlcd(x, lcd, log = FALSE)
plcd(q, lcd, lower.tail = TRUE, log.p = FALSE)
vector of quantiles.
an object of class lcd
.
logical. If TRUE, the log density or log probability values are to be returned.
logical. If TRUE
(default), probabilities are
p[X <= q]; if otherwise, p[X > q].
dlcd
gives the density values, and plcd
gives the
distribution function values.
Liu, Y. and Wang, Y. (2018). A Fast Algorithm for Univariate Log-concave Density Estimation. Australia & New Zealand Journal of Statistics (To appear).
# NOT RUN {
x = rnorm(1000)
r = cnmlcd(x)
dlcd(-4:4, r$lcd)
dlcd(-4:4, r$lcd, log=TRUE)
plcd(-4:4, r$lcd)
plcd(-4:4, r$lcd, lower.tail = FALSE)
# }
Run the code above in your browser using DataLab