get_opt_results: Obtain the optimization results from an aghq object

View source: R/02-normalization.R

get_opt_resultsR Documentation

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 class 'aghq'
get_opt_results(obj, ...)

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

Arguments

obj

Object of class aghq returned by aghq::aghq.

...

Not used

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.

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


aghq documentation built on June 7, 2023, 5:10 p.m.