intF {logcondens}R Documentation

Computes the Integral of the estimated CDF at Arbitrary Real Numbers in s

Description

Based on the output of the function activeSetLogCon, this gives values of

widehat I(t) = int_{x_1}^t widehat{F}(r) d r

at all numbers in s. Note that t (so all elements in s) must lie in [x_1,x_m]. The exact formula for widehat I(t) is

widehat I(t) = Bigl(sum_{i=1}^{i_0} widehat{I}_i(x_{i+1})Bigr)+widehat{I}_{i_0}(t)

where i_0 = min{ m-1 , , {i : x_i <= t } } and

I_j(x) = int_{x_j}^x widehat{F}(r) d r = (x-x_j)widehat{F}(x_j)+Delta x_{j+1}Bigl(frac{Delta x_{j+1}}{Delta widehatvarphi_{j+1}}JBigl(widehatvarphi_j,widehatvarphi_{j+1}, frac{x-x_j}{Delta x_{j+1}}Bigr)-frac{widehat f(x_j)(x-x_j)}{Delta widehat varphi_{j+1}}Bigr)

for x in [x_j, x_{j+1}], j = 1,...,m-1, Delta v_{i+1} = v_{i+1}-v_i for any vector v and the function J introduced in Jfunctions.

Usage

intF(s, x, phi, Fhat)

Arguments

s Vector of real numbers where the functions should be evaluated at.
x Vector {x} = (x_1, ..., x_m) of original observations (sorted).
phi Vector (widehat varphi_m(x_i))_{i=1}^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

Vector of the same length as s, containing the values of widehat I at the elements of s.

Author(s)

Kaspar Rufibach, kaspar.rufibach@gmail.com

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

References

Duembgen, L. and Rufibach, K. (2009) Maximum likelihood estimation of a log–concave density and its distribution function: basic properties and uniform consistency. Bernoulli, 15(1), 40–68.

Rufibach K. (2006) Log-concave Density Estimation and Bump Hunting for i.i.d. Observations. PhD Thesis, University of Bern, Switzerland and Georg-August University of Goettingen, Germany, 2006.
Available at http://www.stub.unibe.ch/download/eldiss/06rufibach_k.pdf.

See Also

This function uses the output of activeSetLogCon. The function intECDF is similar, but based on the empirical distribution function.

Examples

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

## compute and plot the process D(t) in Duembgen and Rufibach (2009)
s <- seq(min(x), max(x), by = 10 ^ -3)
D1 <- intF(s, x, res$phi, res$F)
D2 <- intECDF(s, x)
par(mfrow = c(2, 1))
plot(x, res$phi, type = 'l'); rug(x)
plot(s, D1 - D2, type = 'l'); abline(h = 0, lty = 2)

[Package logcondens version 1.3.3 Index]