Learn R Programming

LogConcDEAD (version 1.1-2)

lcd.marg: Find axis-aligned marginals of the MLE for 2-d data

Description

This function numerically integrates the log MLE of 2-d data to produce axis-aligned marginals for use in plot.LogConcDEAD.

Usage

lcd.marg (out, gridlen=100)

lcd.marg2 (out, gridlen=100)

Arguments

out
Output from lcd.mle (of class LogConcDEAD)
gridlen
Size of grid

Value

  • xx-values of grid (for $X_1$ axis)
  • yy-values of grid (for $X_2$ axis)
  • margIntegrated MLE

Details

Does a (currently rather crude) approximation to the integral of the log MLE, for the purpose of plotting axis-aligned marginals. The integrate routine is used to perform numerical integration.

Currently use lcd.marg for $X_1$ and lcd.marg2 for $X_2$.

Examples

Run this code
#simple normal data, a couple of plots

set.seed(101)
x <- matrix(rnorm(200),ncol=2)
out <- lcd.mle(x)
m1 <- lcd.marg(out)
m2 <- lcd.marg2(out)
par(mfrow=c(1,2))
plot(out,marg=1,g.marg=m1)
plot(out,marg=2,g.marg=m2)

Run the code above in your browser using DataLab