Learn R Programming

logcondens.mode (version 1.0.1)

intFfn: Computes the Integral of a log-concave CDF at Arbitrary Real Numbers

Description

Based on output from the function logConDens, activeSetLogCon, or activeSetLogCon.mode, this function gives a function $\widehat I$ given by

$$\widehat I(l,r) = \int_{l}^{r} \widehat{F}(u) d u$$

or by

$$\widehat I(l,r) = \int_{l}^{r} (1-\widehat{F}(u)) d u$$

Note that $l$ and $r$ must lie in $[x_1,x_m]$. For exact formulas related to these integrals, see the intF function.

Usage

intFfn(x, phi, Fhat, prec = 1e-10, side = "left")

Arguments

x
Vector of (unique) observations from which the (modally-constrained or -unconstrained) log-concave density is estimated. This corresponds to output of preProcess, potentially with a constrain
phi
Numeric vector of same length as x that gives the log-concave estimate's values at x.
Fhat
Numeric vector of same length as x that gives the log-concave estimate CDF's values at x.
prec
Precision argument for the intF function.
side
String taking values "left" or "right". If "left" then returns the first integral given in the description (integral of $\widehat{F}$). If "right" then returns the second integral given in the description (integral of $1-\widehat{F}$).

Value

  • Returns a function $H$. If side is "left" then the return is of type function(upper, lower=rep(x[1],length(upper))). If side is "right" then the return is of type function(lower, upper=rep(x[length(x)],length(lower))). Note that the order of the arguments are changed, so that passing an unnamed numeric value or vector has a default behavior of integrating "from the outside-in".

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 or activeSetLogCon.mode. The function intECDFfn is similar, but based on the empirical distribution function. The function intF behaves similarly but returns a vector instead of a function.

Examples

Run this code
## estimate gamma density
set.seed(1977)
x <- rgamma(200, 2, 1)
res <- activeSetLogCon.mode(x, mode=1)

##  res$x is not equal to x
myIntF <- intFfn( res$x,  res$phi, res$Fhat, side="left")


s <- seq(min(res$x), max(res$x), by = 10 ^ -3)
D1 <- myIntF(s)

Run the code above in your browser using DataLab