Skip to contents

Profile Likelihood Plot

Usage

# S3 method for class 'parframe'
plotProfile(
  profs,
  ...,
  maxvalue = 5,
  parlist = NULL,
  ncol = NULL,
  threshold = .profileLines()
)

# S3 method for class 'list'
plotProfile(
  profs,
  ...,
  maxvalue = 5,
  parlist = NULL,
  ncol = NULL,
  threshold = .profileLines()
)

plotProfile(profs, ...)

Arguments

profs

A parframe of profiles as returned by profile(), or a list of those.

...

Logical expressions to subset the plotted data.

maxvalue

Numeric, the value of the objective difference at which profiles are cut off. Defaults to 5.

parlist

Matrix or data frame with parameter columns, drawn as points. With a value column, a point is drawn at the difference of value to the lowest objective value at the optima of the profiles, otherwise at 0.

ncol

Number of columns of the plot grid. NULL (default) lets ggplot2::facet_wrap() choose.

threshold

Numeric, the horizontal lines and y-axis breaks above the optimum, which is always drawn. Defaults to the chi-square thresholds for 68%, 90% and 95%. Names are used as axis labels. Pass the value of profileThreshold() to match confint.parframe().

Value

A ggplot object with the plotted data frame as attribute "data".

Examples

pars <- c(a = 1, b = 0.5)
obj <- constraintL2(mu = pars, sigma = 0.1)
profs <- profile(obj, pars, whichPar = c("a", "b"), limits = c(-1, 1),
                 cores = 1)
plotProfile(profs)