Learn R Programming

LogConcDEAD (version 1.1-2)

lcd.interp: 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

Value

  • xx-values of grid
  • yy-values of grid
  • zLog MLE on a grid

Details

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

See Also

Examples

Run this code
#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")

Run the code above in your browser using DataLab