Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

intF

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


Description

Based on an object of class dlc as output by the function logConDens, this function gives values of

\hat I(t) = \int_{x_1}^t \hat{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

\hat I(t) = (∑_{i=1}^{i_0} \hat{I}_i(x_{i+1}))+\hat{I}_{i_0}(t)

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

I_j(x) = int_{x_j}^x \hat{F}(r) d r = (x-x_j)\hat{F}(x_j)+Δ x_{j+1}((Δ x_{j+1})/(Δ \hatφ_{j+1})J(\hatφ_j, \hat φ_{j+1}, (x-x_j)/(Δ x_{j+1}))-(\hat f(x_j)(x-x_j))/(Δ \hat φ_{j+1}))

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

Usage

intF(s, res)

Arguments

s

Vector of real numbers where the functions should be evaluated at.

res

An object of class "dlc", usually a result of a call to logConDens.

Value

Vector of the same length as \bold{s}, containing the values of \widehat I at the elements of s.

Author(s)

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.

Duembgen, L. and Rufibach, K. (2011) logcondens: Computations Related to Univariate Log-Concave Density Estimation. Journal of Statistical Software, 39(6), 1–28. http://www.jstatsoft.org/v39/i06

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.zb.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 <- rgamma(200, 2, 1)
res <- logConDens(x, smoothed = FALSE, print = FALSE)

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

logcondens

Estimate a Log-Concave Probability Density from Iid Observations

v2.1.5
GPL (>= 2)
Authors
Kaspar Rufibach <kaspar.rufibach@gmail.com> and Lutz Duembgen <duembgen@stat.unibe.ch>
Initial release
2016-07-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.