intF {logcondens} | R Documentation |
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
\widehat I(t) = \int_{x_1}^t \widehat{F}(r) d r
at all numbers in \bold{s}
. Note that t
(so all elements in \bold{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 \le 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 \widehat\phi_{j+1}}J\Bigl(\widehat\phi_j,\widehat\phi_{j+1}, \frac{x-x_j}{\Delta x_{j+1}}\Bigr)-\frac{\widehat f(x_j)(x-x_j)}{\Delta \widehat \phi_{j+1}}\Bigr)
for x \in [x_j, x_{j+1}], \ j = 1,\ldots, m-1
, \Delta v_{i+1} = v_{i+1} - v_i
for any vector \bold{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 |
Value
Vector of the same length as \bold{s}
, containing the values of \widehat I
at the elements of
\bold{s}
.
Author(s)
Kaspar Rufibach, kaspar.rufibach@gmail.com,
http://www.kasparrufibach.ch
Lutz Duembgen, duembgen@stat.unibe.ch,
https://www.imsv.unibe.ch/about_us/staff/prof_dr_duembgen_lutz/index_eng.html
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. doi:10.18637/jss.v039.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 https://slsp-ube.primo.exlibrisgroup.com/permalink/41SLSP_UBE/17e6d97/alma99116730175505511.
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)