Learn R Programming

LogConcDEAD (version 1.1-1)

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

Description

This function uses Shor's $r$-algorithm to compute $\textrm{arg} \max \sum_{i=1}^n w_i p(X_i)$ subject to $p$ a log-concave density, the maximum weighted likelihood estimator of a log-concave density. The estimator is determined by its value at data points.

Usage

lcd.weights(X, weights=NULL, initial=NULL, 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 (must be non-zero). Will be renormalized to sum to 1. If NULL, $\frac{1}{n} \forall n$ will be used. Note that this is the same as lcd.mle.
initial
Starting point for the $r$-algorithm. If NULL (the default), 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 estimator 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
  • chullVector containing final triangulation of convex hull of data
  • vertsDetails of triangulation for use in lcd.eval
  • vertsoffsetDetails of triangulation for use in lcd.eval

Details

The estimator 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) = - \sum_{i=1}^n w_i y_i + \int \exp(\bar{h}_y(x)) \, dx.$$ This is equivalent to the original prob An implementation of Shor's $r$-algorithm based on SolvOpt is used.

Computing $\sigma$ makes use of the qhull (http:\www.qhull.org) library, via 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, with randomly selected weights
set.seed(101)
x <- matrix(rnorm(200), ncol=2)
w <- runif(100)
w <- w/sum(w)
out <- lcd.weights(x,w)

Run the code above in your browser using DataLab