Learn R Programming

LogConcDEAD (version 1.2-0)

lcd.mle: Compute the maximum likelihood estimator of a log-concave density

Description

This function uses Shor's $r$-algorithm to compute the maximum likelihood estimator of a log-concave density based on an i.i.d. sample. The estimator is determined by its value at data points.

Usage

lcd.mle (X, weights=rep(1/nrow(X),nrow(X)),
y=initialy(X), verbose=-1, alpha=5, c=1, sigmatol=10^-8,
integraltol=10^-4, ytol=10^-4, stepscale=5.1, stepscale2=2,
stepscale3=1.5, stepscale4=1.05, desiredsize=3.3, Jtol=0.001)

Arguments

X
Data in $R^d$, in the form of an $n \times d$ numeric matrix
weights
weights $w_i$ such that the computed estimator maximizes $\sum_{i=1}^n w_i f(X_i)$
y
Starting point for the $r$-algorithm. If none given, a kernel estimate is used.
verbose
ll{ -1 (default) prints nothing 0 prints warning messages $n>0$ prints summary information every $n$ iterations}
alpha
Scaling parameter for SolvOpt
c
Starting step size
sigmatol
Stopping criterion: relative change in $\sigma$ (see Details for details)
ytol
Stopping criterion: relative change in $y$ (see Details for details)
integraltol
Stopping criterion: difference from 1 of integral of $\exp(\bar{h}_y)$ (see Details for details)
stepscale,stepscale2,stepscale3,stepscale4
Parameters for SolvOpt
desiredsize
Another parameter for SolvOpt (changing this is not recommended)
Jtol
Parameter controlling when Taylor expansion is used in computing the function $\sigma$

Value

  • xData (reordered)
  • wWeights
  • logMLEVector of the log of the MLE at the observation points
  • NumberOfEvaluationsNumber of steps, number of function evaluations, number of subgradient evaluations. If the SolvOpt algorithm fails, the first component will be an error message.
  • MinSigmaMinimum value of the objective function
  • bsee Details
  • betasee Details
  • triangVector containing final triangulation of convex hull of data
  • vertsDetails of triangulation for use in lcd.eval
  • vertsoffsetDetails of triangulation for use in lcd.eval
  • chullVector containing vertices of faces of the convex hull
  • outnormOutward pointing normal vectors for the faces of the convex hull
  • outoffsetA point on each face of the convex hull of the data

Details

The MLE of a log-concave density is of the form $$\bar{h}_y(x) = \inf \lbrace h(x) \colon h \textrm{ concave }, h(X_i) \geq y_i \textrm{ for } i = 1, \ldots, n \rbrace$$ for some $y \in R^n$.

Functions of this form are piecewise linear on the convex hull of $X_1, \ldots, X_n$, and of the form $$\min \lbrace \langle b_j, x \rangle - \beta_j \rbrace$$ for some vectors $b_j$ and constants $\beta_j$. This function uses Shor's $r$-algorithm (an iterative subgradient-based procedure) to minimise over vectors $y$ in $R^n$ the function $$\sigma(y) = -\frac{1}{n} \sum_{i=1}^n y_i + \int \exp(\bar{h}_y(x)) \, dx.$$ This is equivalent to finding the MLE. An implementation of Shor's $r$-algorithm based on SolvOpt is used.

Computing $\sigma$ makes use of the qhull (http:\www.qhull.org) library, adapted from the Rimplementation in geometry. Code from this package is copied here as it is not currently possible to use compiled code from another package.

References

Cule, M. L., Samworth, R. J., and Stewart, M. I. (2007) Computing the nonparametric maximum likelihood estimator of a log-concave density In preparation

Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T. (1996) The Quickhull algorithm for convex hulls ACM Trans. on Mathematical Software, 22(4) p.469-483 http://www.qhull.org

Kappel, F. and Kuntsevich, A. V. (2000) An implementation of Shor's r-algorithm Computational Optimization and Applications 15(2) p.193-205

http://www.uni-graz.at/imawww/kuntsevich/solvopt/

N. Z. Shor (1985) Minimization methods for nondifferentiable functions Springer-Verlag

See Also

geometry

Examples

Run this code
## some simple normal data
set.seed(101)
x <- matrix(rnorm(200), ncol=2)
out <- lcd.mle(x)

Run the code above in your browser using DataLab