plot.LogConcDEAD {LogConcDEAD}R Documentation

Plot a log-concave maximum likelihood estimator

Description

plot method for class "LogConcDEAD". Plots of various types are available for 1- and 2-d data. For dimension greater than 1, plots of axis-aligned marginal density estimates are available.

Usage

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

Arguments

x Object of class "LogConcDEAD" (typically output from mlelcd)
uselog Scalar logical: should the plot be on the log scale?
type Plot type: "p" perspective, "c" contour, "i" image, ic image and contour, r using rgl (the best!)
addp Scalar logical: should the data points be plotted? (On the surface for d >= 2; as tick marks for d=1)
drawlabels Scalar logical: should labels be added to contour lines? (only relevant for types "ic" and "c")
gridlen Integer scalar indicating the number of points at which the maximum likelihood estimator is evaluated in each dimension
g (optional) a matrix of density estimate values (the result of a call to interplcd). If many plots of a single dataset are required, it may be quicker to compute the grid using interplcd(x) and pass the result to plot
marg If non-NULL, this scalar integer determines which marginal should be plotted (should be between 1 and d)
g.marg If g is non-NULL, can contain a vector of marginal density estimate values (the output of interpmarglcd). If many plots of a single dataset are required, it may be quicker to compute the marginal values to compute marginal values using interpmarglcd and pass the result to plot
... Other arguments to be passed to the generic plot method

Details

The density estimate is evaluated on a grid of points using the interplcd function. If several plots are required, this may be computed separately and passed to plot using the g argument.

For two dimensional data, the default plot type is "ic", corresponding to image and contour plots. These may be obtained separately using plot type "i" or "c" respectively. Where available, the use of plot type "r" is recommended. This uses the rgl package to produce a 3-d plot that may be rotated by the user. The option "p" produces perspective plots.

For data of dimension at least 2, axis-aligned marginals may be plotted by setting the marg argument. This integrates the estimated density over the remaining dimensions. If several plots are required, the estimate may be computed using the function interpmarglcd and passed using the argument g.marg.

Where relevant, the colors were obtained from the function heat_hcl in the package colorspace. Thanks to Achim Zeileis for this suggestion.

For examples, see mlelcd.

Author(s)

Madeleine Cule mlc40@cam.ac.uk

Robert B. Gramacy

Richard Samworth

See Also

mlelcd, interp, interplcd, interpmarglcd, heat_hcl


[Package LogConcDEAD version 1.3-3 Index]