Learn R Programming

AGHQ: Adaptive Gauss Hermite Quadrature for Bayesian Inference

This package implements Bayesian inference using Adaptive Gauss-Hermite Quadrature, as specified in our paper Stochastic Convergence Rates and Applications of Adaptive Quadrature in Bayesian Inference with Yanbo Tang and Blair Bilodeau. See also the accompanying vignette, available on arXiv, and the complete code for the examples from that vignette.

You can install the development version from Github:

install.packages('devtools')
devtools::install_github('awstringer1/aghq')

You can also install the stable version from CRAN:

install.packages('aghq')

The two papers linked above give a comprehensive overview of the method, application, and theory.

Copy Link

Version

Install

install.packages('aghq')

Monthly Downloads

424

Version

0.4.1

License

GPL (>= 3)

Maintainer

Alex Stringer

Last Published

June 2nd, 2023

Functions in aghq (0.4.1)

get_param_dim

Obtain the parameter dimension from an aghq object
gcdatalist

Transformed Globular Clusters data
get_nodesandweights

Obtain the nodes and weights table from a fitted quadrature object
get_mode

Obtain the mode from an aghq object
get_hessian

Obtain the Hessian from an aghq object
get_numquadpoints

Obtain the number of quadrature nodes used from an aghq object
get_log_normconst

Obtain the log-normalizing constant from a fitted quadrature object
interpolate_marginal_posterior

Interpolate the Marginal Posterior
get_opt_results

Obtain the optimization results from an aghq object
laplace_approximation

Laplace Approximation
normalize_logpost

Normalize the joint posterior using AGHQ
nested_quadrature

Nested, sparse Gaussian quadrature in AGHQ
plot.aghq

Plot method for AGHQ objects
make_transformation

Marginal Parameter Transformations
marginal_laplace_tmb

AGHQ-normalized marginal Laplace approximation from a TMB function template
make_moment_function

Moments of Positive Functions
marginal_posterior

Marginal Posteriors
optimize_theta

Obtain function information necessary for performing quadrature
marginal_laplace

Marginal Laplace approximation
make_numeric_moment_function

Compute numeric moments
print.marginallaplacesummary

Summary statistics for models using marginal Laplace approximations
summary.marginallaplace

Summary statistics for models using marginal Laplace approximations
summary.aghq

Summary statistics computed using AGHQ
print.laplace

Print method for AGHQ objects
validate_control

Validate a control list
summary.laplace

Summary method for Laplace Approximation objects
sample_marginal

Exact independent samples from an approximate posterior distribution
print.aghq

Print method for AGHQ objects
print.aghqsummary

Print method for AGHQ summary objects
validate_transformation

Validate a transformation object
validate_moment

Validate a moment function object
print.laplacesummary

Print method for laplacesummary objects
correct_marginals

Correct the posterior marginals of a fitted aghq object
compute_quantiles

Quantiles
compute_pdf_and_cdf

Density and Cumulative Distribution Function
default_control

Default control arguments for aghq::aghq().
aghq

Adaptive Gauss-Hermite Quadrature
gcdata

Globular Clusters data for Milky Way mass estimation
default_control_tmb

Default control arguments for aghq::marginal_laplace_tmb().
default_control_marglaplace

Default control arguments for aghq::marginal_laplace().
default_transformation

Default transformation
compute_moment

Compute moments