plot1Dprof: Plot likelihood profiles

Description Usage Arguments Details Value Examples

View source: R/plotProfiles.R

Description

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

Usage

1
2
3
4
5
6
7
plot1Dprof(object, pars=object$colTypes$fittedPars, type="logLR",   
           gridSteps=21, xlabs=list(), ylab, scales=NULL,
           plotpar=list(pch=20), 
           control=list(min=-7.568353, shadow_col="grey70"))
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

Character: "logL" to plot the log-likelihood profile; "logLR" (or "LR" for the not-log version) to plot the log-likelihood-ratio profile (the default); or "zoom" or "dual" for variants of "logLR" (see details).

gridSteps

The number of values (in each dimension for 2D plots) which likelihood should be computed. For 1D plots, gridSteps=0 is now obsolete.

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). Possible values of each element of the vector are "identity" (default), "log", and "log10",

plotpar

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

control

Control of "zoom" or "dual" plots (see Details).

margefrac

For development purposes, not documented.

Details

A "zoom" plot shows only the top part of the profile, defined as points whose y-values are above a threshold minus-log-likelihood ratio control$min, whose default is -7.568353, the 0.9999 p-value threshold.

A "dual" plot displays both the zoom, and a shadow graph showing the full profile. The dual plot is shown only when requested and if there are values above and below control$min. The shadow curve color is given by control$shadow_col.

Value

Both functions return a list, which currently has a single element MSL_updated which is a boolean indicating whether the summary-likelihood maximum (but not the intervals) has been recomputed.

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)))) 
}

Infusion documentation built on Feb. 22, 2021, 9:08 a.m.