Learn R Programming

aghq (version 0.4.1)

get_opt_results: Obtain the optimization results from an aghq object

Description

Quick helper S3 method to retrieve the mode and Hessian from an aghq object. The full results of calling aghq::optimize_theta are stored in obj$optresults.

Usage

get_opt_results(obj, ...)

# S3 method for aghq get_opt_results(obj, ...)

# S3 method for marginallaplace get_opt_results(obj, ...)

Value

A named list with elements:

  • mode: a numeric vector of length dim(theta) containing the posterior mode.

  • hessian: a numeric matrix of dimension dim(theta) x dim(theta) containing the negative Hessian of the log-posterior evaluated at the mode.

For objects of class marginallaplace, a third list item modesandhessians is a data.frame containing the mode and Hessian of the W parameters evaluated at each adapted quadrature point.

Arguments

obj

Object of class aghq returned by aghq::aghq.

...

Not used

See Also

Other quadrature: aghq(), get_hessian(), get_log_normconst(), get_mode(), get_nodesandweights(), get_numquadpoints(), get_param_dim(), laplace_approximation(), marginal_laplace_tmb(), marginal_laplace(), nested_quadrature(), normalize_logpost(), optimize_theta(), plot.aghq(), print.aghqsummary(), print.aghq(), print.laplacesummary(), print.laplace(), print.marginallaplacesummary(), summary.aghq(), summary.laplace(), summary.marginallaplace()