plot method for class "confint".
Plots the (profile) loglikelihood for a parameter using the values
calculated by conf_intervals.
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.
By default (add_lines = TRUE) the confidence limits calculated
in conf_intervals are indicated on the plot .
Arguments
- x, y, y2, y3
objects of class
"confint", results of calls toconf_intervalsfor a common model. A (profile) loglikelihood will be plotted for each object.- which_par
A scalar specifying the parameter for which the plot is produced. Can be either a numeric scalar, specifying index of the component of the full parameter vector, or a character scalar parameter name. The former must be in
x$which_pars, the latter must be innames(x$which_pars).- conf
A numeric vector of values in (0, 100). If
add_lines = TRUEthen a horizontal line is added for each value inconf. Ifconfis not supplied then the value stored inx$confis used.- add_lines
A logical scalar. Whether or not to add horizontal lines to the plot to identify the confidence limits. If there is only one input
"confint"object then the values of the confidence limits will be added to the horizontal axis.- legend
A logical scalar or a character vector. If this is supplied then a legend is added to the plot. If
legendis a character vector then it is used as the argumentlegendtolegend. Otherwise, i.e. iflegend = TRUEthen the componenttypeof the input object(s)x, y, y2, y3are used.- legend_pos
The position of the legend (if required) specified using the argument
xinlegend.- ...
Additional arguments passed to
matplotorlegend. The argumentscol,ltyandlwdwill be used (in a consistent way) by bothmatplotandlegend.
Examples
See the examples in conf_intervals.
See also
adjust_loglik to adjust a user-supplied
loglikelihood function.
conf_intervals for confidence intervals for
individual parameters.
conf_region and plot.confreg to
plot a confidence region for a pair of parameters.