quantilesLogConDens {logcondens}R Documentation

Function to compute p0-Quantile of Fhat

Description

Function to compute p_0-quantile of

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

where widehat f_m is the log-concave density estimator, received via activeSetLogCon. The formula to compute a quantile at u in [widehat F_m(x_j), widehat F_m(x_{j+1})] for j = 1, ..., n-1 is:

widehat F_m^{-1}(u) = x_j + (x_{j+1}-x_j) G^{-1}_{(x_{j+1}-x_j)(widehat varphi_{j+1}-widehat varphi_j)} Big( frac{u - widehat F_m(x_j)}{ widehat F_m(x_{j+1}) - widehat F_m(x_j)}Big),

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

Usage

quantilesLogConDens(p0, x, phi, Fhat)

Arguments

p0 Real number where quantil should be computed.
x Sorted vector of original observations {x} = (x_1, ..., x_m).
phi Vector (widehat varphi_m(x_1), ..., widehat varphi_m(x_m)), representing the function widehat varphi_m, as computed by activeSetLogCon.
Fhat Vector (widehat F_{m,i})_{i=1}^m with entries

widehat F_{m,i} = int_{x_1}^{x_i} exp(widehat varphi_m(t)) dt,

as computed by activeSetLogCon.

Value

Returns the real number q_0 = inf_{x}{widehat F_m(x) >= p_0}.

Author(s)

Kaspar Rufibach, kaspar.rufibach@gmail.com

Lutz Duembgen, duembgen@stat.unibe.ch,
http://www.staff.unibe.ch/duembgen

Examples

## estimate gamma density
set.seed(1977)
x <- sort(rgamma(200, 2, 1))
res <- activeSetLogCon(x, w = NA, print = FALSE)

## compute 0.95 quantile of Fhat
q <- quantilesLogConDens(0.95, x, res$phi, res$Fhat)
plot(x, res$Fhat, type = 'l'); rug(x)
abline(h = 0.95, lty = 3); abline(v = q, lty = 3)

[Package logcondens version 1.3.3 Index]