# quantilesLogConDens: Function to compute Quantiles of Fhat In logcondens: Estimate a Log-Concave Probability Density from Iid Observations

## Description

Function to compute p_0-quantile of

\hat F_m(t) = \int_{x_1}^t \hat f_m(t) dt,

where \widehat f_m is the log-concave density estimator, typically computed via logConDens and p_0 runs through the vector ps. The formula to compute a quantile at u \in [\hat F_m(x_j), \hat F_m(x_{j+1})] for j = 1, …, n-1 is:

\hat F_m^{-1}(u) = x_j + (x_{j+1}-x_j) G^{-1}_{(x_{j+1}-x_j)(\hat φ_{j+1}-\hat φ_j)} ((u - \hat F_m(x_j))/(\hat F_m(x_{j+1}) - \hat F_m(x_j))),

where G^{-1}_θ is described in qloglin.

## Usage

 1 quantilesLogConDens(ps, res) 

## Arguments

 ps Vector of real numbers where quantiles should be computed. res An object of class "dlc", usually a result of a call to logConDens.

## Value

Returns a data.frame with row (p_{0, i}, q_{0, i}) where q_{0, i} = inf_{x}{\hat F_m(x) ≥ p_{0, i}} and p_{0, i} runs through ps.

## Author(s)

Kaspar Rufibach, kaspar.rufibach@gmail.com,
http://www.kasparrufibach.ch

## Examples

 1 2 3 4 5 6 7 8 9 ## estimate gamma density set.seed(1977) x <- rgamma(200, 2, 1) res <- logConDens(x, smoothed = FALSE, print = FALSE) ## compute 0.95 quantile of Fhat q <- quantilesLogConDens(0.95, res)[, "quantile"] plot(res, which = "CDF", legend.pos = "none") abline(h = 0.95, lty = 3); abline(v = q, lty = 3) 

logcondens documentation built on May 2, 2019, 6:11 a.m.