"LogConcDEAD" which
contains all the information needed to plot the estimator using the
plot method, or to evaluate it using
the function dlcd.mlelcd(x, w=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, chtol=10^-6)lcd.mle(x, w=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, chtol=10^-6)
matrixsigmatol for algorithm to terminate. (See Details)ytol for algorithm to terminate. (See
Details)integraltol for algorithm to terminate. (See Details)"LogConcDEAD", with the following
components:vector of
the log of the maximum likelihood estimate, evaluated at the observation pointsmatrix (see Details)vector (see Details)matrix containing final triangulation of the convex hull of the datamatrix containing details of triangulation for use in dlcdmatrix containing details of triangulation for use in dlcdmatrix where each row is an outward
pointing normal vectors for the faces of the convex hull of the
data. The number of vectors depends on the number of faces of the
convex hull.matrix where each row is a point on a face of
the convex hull of the data. The number of vectors depends on the
number of faces of the convex hull. Functions of this form may equivalently be specified by dividing
$C_n$, the convex hull of the data, into simplices $C_j$ for
$j \in J$ (triangles in 2d, tetrahedra in 3d etc), and setting
$$f(x) = \exp{b_j^T x - \beta_j}$$
for $x \in C_j$, and $f(x) = 0$ for $x \notin
C_n$.
This function uses Shor's $r$-algorithm (an iterative
subgradient-based procedure) to minimize 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 log-concave
maximum likelihood estimator, as demonstrated in Cule, Samworth
and Stewart (2008).
An implementation of Shor's $r$-algorithm based on
Computing $\sigma$ makes use of the
lcd.mle is deprecated, but retained for compatibility with
previous versions.
Cule, M. L. and D"umbgen, L. (2008) On an auxiliary function for
log-density estimation, University of Bern technical report.
Cule, M. L., Samworth, R. J., and Stewart, M. I. (2007)
Maximum likelihood estimation of a log-concave density,
Submitted.
Kappel, F. and Kuntsevich, A. V. (2000)
An implementation of Shor's r-algorithm Computational
Optimization and Applications 15
Shor, N. Z. (1985) Minimization methods for nondifferentiable functions Springer-Verlag
convhulln,
logcondens,
interplcd, plot.LogConcDEAD,
interpmarglcd, rlcd, dlcd, dmarglcd## Some simple normal data, and a few plots
x <- matrix(rnorm(200),ncol=2)
lcd <- mlelcd(x)
g <- interplcd(lcd)
par(mfrow=c(2,2), ask=TRUE)
plot(lcd, g=g, type="c")
plot(lcd, g=g, type="c", uselog=TRUE)
plot(lcd, g=g, type="i")
plot(lcd, g=g, type="i", uselog=TRUE)
## Some plots of marginal estimates
par(mfrow=c(1,1))
g.marg1 <- interpmarglcd(lcd, marg=1)
g.marg2 <- interpmarglcd(lcd, marg=2)
plot(lcd, marg=1, g.marg=g.marg1)
plot(lcd, marg=2, g.marg=g.marg2)
## generate some points from the fitted density
generated <- rlcd(100, lcd)
genmean <- mean(generated)
## evaluate the fitted density
mypoint <- c(0, 0)
dlcd(mypoint, lcd, uselog=FALSE)
mypoint <- c(10, 0)
dlcd(mypoint, lcd, uselog=FALSE)
## evaluate the marginal density
dmarglcd(0, lcd, marg=1)
dmarglcd(1, lcd, marg=2)Run the code above in your browser using DataLab