plot.confreg: Plot diagnostics for a confreg object

View source: R/plot_summary_print.R

plot.confregR Documentation

Plot diagnostics for a confreg object

Description

plot method for class "confreg". Plots confidence regions for pairs of parameters using the profile loglikelihood values calculated by conf_region. Up to 4 different types of loglikelihood (see the argument type to the function returned by adjust_loglik) may be superimposed on the same plot.

Usage

## S3 method for class 'confreg'
plot(
  x,
  y = NULL,
  y2 = NULL,
  y3 = NULL,
  conf = 95,
  legend = any(c(!is.null(y), !is.null(y2), !is.null(y3))),
  legend_pos = "topleft",
  ...
)

Arguments

x, y, y2, y3

objects of class "confreg", results of calls to conf_region for a common model and a common value of which_pars. Contours are plotted for each object.

conf

A numeric vector of confidence levels, i.e. numbers in (0, 100). A confidence region contour is plotted for each value in conf.

legend

A logical scalar or a character vector. If this is supplied then a legend is added to the plot. If legend is a character vector then it is used as the argument legend to legend. Otherwise, i.e. if legend = TRUE then the component type of the input object(s) x, y, y2, y3 are used.

legend_pos

The position of the legend (if required) specified using the argument x in legend.

...

Additional arguments passed to contour or legend. The arguments col, lty and lwd will be used (in a consistent way) by both contour and legend.

Value

Nothing is returned.

Examples

See the examples in conf_region.

See Also

adjust_loglik to adjust a user-supplied loglikelihood function.

conf_region for a confidence region for a pair of parameters.

conf_intervals and plot.confint to plot confidence intervals for individual parameters.


chandwich documentation built on Aug. 26, 2023, 1:07 a.m.