Plot likelihood profiles

Share:

Description

These functions plot 1D and 2D profiles from an SLik object

Usage

1
2
3
4
5
6
plot1Dprof(object, pars=object$colTypes$fittedPars, type="logLR",   
           gridSteps=21, xlabs=list(), ylab, scales=NULL,
           plotpar=list(pch=20))
plot2Dprof(object, pars=object$colTypes$fittedPars, type="logLR",  
           gridSteps=17, xylabs=list(), main, scales=NULL,
           plotpar=list(pch=20), margefrac = 0)

Arguments

object

An SLik object

pars

The parameters for which profiles will be computed. For 2D plots, all pairs of parameters in pars are considered

type

logLR or LR or logL for the (log) likelihood ratio or the log likelihood

gridSteps

The number of values (in each dimension for 2D plots) which likelihood should be computed. For 1D plots, gridSteps=0 will call curve rather than a plot of points

xlabs

A list of alternative axis labels. The names of the list elements should be elements of pars (see Examples)

xylabs

Same as xlabs but affecting both axes in 2D plots

ylab

Same as ylab argument of plot. Default depends on type argument.

main

Same as main argument of plot. Default depends on type argument.

scales

A named character vector, which controls ticks and tick labels on axes, so that these can be expressed as (say) the exponential of the parameter inferred in the SLik object. For example if the likelihood of logPop = log(population size) was thus inferred, scales=c(logPop="log") will give population size values on the axis (but will retain a log scale for this parameter).

plotpar

arguments for par() such as font sizes, etc.

margefrac

For development purposes, not documented.

Value

No return value.

Examples

1
2
3
4
5
6
if (Infusion.getOption("example_maxtime")>40) {
 data(densv)
 slik <- infer_surface(densv) ## infer a log-likelihood surface
 slik <- MSL(slik) ## find the maximum of the log-likelihood surface
 plot1Dprof(slik,pars="s2",gridSteps=40,xlabs=list(s2=expression(paste(sigma^2))))
}