lcd.interp {LogConcDEAD}R Documentation

Evaluate the log-concave MLE of 2-d data on a grid for plotting

Description

A function (using the akima package) to evaluate the logarithm of the log-concave MLE on a grid for 2-d data, for use in plot.LogConcDEAD.

Usage

 lcd.interp(out, gridlen=100, span=0.5, ...) 

Arguments

out Output from lcd.mle (of class LogConcDEAD)
gridlen Size of grid
span Parameter needed by interp
... Other arguments to be passed to interp

Details

Uses the akima package's interp function to linearly interpolate.

Value

x x-values of grid
y y-values of grid
z Log MLE on a grid

Note

Needs the akima package.

Author(s)

Madeleine Cule mlc40@cam.ac.uk

Robert Gramacy

Richard Samworth

See Also

<interp> <rgl>

Examples

#simple normal data, a couple of plots

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]