intF: Computes the Integral of the estimated CDF at Arbitrary Real...

Description Usage Arguments Value Author(s) References See Also Examples

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 \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(∑_{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)+Δ x_{j+1}\Bigl(\frac{Δ x_{j+1}}{Δ \widehat\varphi_{j+1}}J\Bigl(\widehat\varphi_j,\widehat\varphi_{j+1}, \frac{x-x_j}{Δ x_{j+1}}\Bigr)-\frac{\widehat f(x_j)(x-x_j)}{Δ \widehat \varphi_{j+1}}\Bigr)

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

Note that this version of intF is similar to that in the logcondens package, versions 1.3.5 and earlier. Newer versions of that package have modified arguments. Here, we have also added the argument 'prec'.

Usage

1
intF(s, x, phi, Fhat, prec=1e-10)

Arguments

s

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

x

Vector {\bold{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.

prec

Governs cutoff at which an approximation for the needed integral is used.

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@ifspm.uzh.ch,
http://www.biostat.uzh.ch/aboutus/people/rufibach.html

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

References

Duembgen, L, Huesler, A. and Rufibach, K. (2010) Active set and EM algorithms for log-concave densities based on complete and censored data. Technical report 61, IMSV, Univ. of Bern, available at http://arxiv.org/abs/0707.4643.

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

Doss, C. R. (2013). Shape-Constrained Inference for Concave-Transformed Densities and their Modes. PhD thesis, Department of Statistics, University of Washington, in preparation.

Doss, C. R. and Wellner, J. A. (2013). Inference for the mode of a log-concave density. Technical Report, University of Washington, in preparation.

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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$Fhat)
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)

logcondens.mode documentation built on May 2, 2019, 8:26 a.m.