plot.LogConcDEAD {LogConcDEAD}R Documentation

Plot function for log-concave MLE

Description

This plot function currently only plots 1- and 2-d data.

Usage

## S3 method for class 'LogConcDEAD':
plot(x, uselog=FALSE, method="akima", itype="p", addp=TRUE, gridlen=100,
g=NULL, marg=NULL, g.marg=NULL, ...)

Arguments

x Object of class LogConcDEAD (e.g. as output from lcd.mle)
uselog logical indicating whether the log or true scale should be plotted
method The akima package is used for linear interpolation
itype Plot type: p perspectice, c contour, i image, ic image and contour, r using rgl (the best!)
addp logical: should the data points be plotted on the surface?
gridlen Number of points at which the MLE is evaluated in each direction
g If many plots are required, it may be quicker to compute the grid using lcd.interp(out) and pass the result to plot
marg axis-aligned marginals can be plotted (set to 1 or 2)
g.marg may be quicker to compute marginal using lcd.marg or lcd.marg2 and pass to plot
... Other plot arguments

Details

This function makes use of the akima package.

For one-dimensional data, the log MLE is piecewise linear with knots at observation points.

The same is (roughly speaking) true in higher dimensions. The MLE is evaluated on a grid using the interp function from akima.

To come: plotting of marginals for higher-dimensional data.

Author(s)

Madeleine Cule mlc40@cam.ac.uk

Robert B. Gramacy

Richard Samworth

See Also

interp

Examples


## some simple normal data

set.seed(101)
x <- matrix(rnorm(200), ncol=2)
out <- lcd.mle(x)
g <- lcd.interp(out)
par(mfrow=c(2,2))
plot(out, g=g, itype="c", main="Density")
plot(out, g=g, itype="c", uselog=TRUE, main="LogDensity")
plot(out, g=g, itype="i", main="Density")
plot(out, g=g, itype="i", uselog=TRUE, main="LogDensity")

[Package LogConcDEAD version 1.1-2 Index]