Learn R Programming

openCR (version 2.2.6)

LLsurface: Plot Likelihood Surface

Description

Calculate log likelihood over a grid of values of two beta parameters from a fitted openCR model and optionally make an approximate contour plot of the log likelihood surface.

This is a method for the generic function LLsurface defined in secr.

Usage

# S3 method for openCR
LLsurface(object, betapar = c("phi", "sigma"), xval = NULL, yval = NULL, 
   centre = NULL, realscale = TRUE, plot = TRUE, plotfitted = TRUE, ncores = NULL, ...)

Value

Invisibly returns a matrix of the log likelihood evaluated at each grid point

Arguments

object

openCR object output from openCR.fit

betapar

character vector giving the names of two beta parameters

xval

vector of numeric values for x-dimension of grid

yval

vector of numeric values for y-dimension of grid

centre

vector of central values for all beta parameters

realscale

logical. If TRUE input and output of x and y is on the untransformed (inverse-link) scale.

plot

logical. If TRUE a contour plot is produced

plotfitted

logical. If TRUE the MLE from object is shown on the plot (+)

ncores

integer number of cores available for parallel processing

...

other arguments passed to contour

Details

centre is set by default to the fitted values of the beta parameters in object. This has the effect of holding parameters other than those in betapar at their fitted values.

If xval or yval is not provided then 11 values are set at equal spacing between 0.8 and 1.2 times the values in centre (on the `real' scale if realscale = TRUE and on the `beta' scale otherwise).

Contour plots may be customized by passing graphical parameters through the ... argument.

The value of ncores is passed to openCR.fit.

See Also

LLsurface.secr

Examples

Run this code

# not yet

Run the code above in your browser using DataLab