A package for fast, numerically-stable computation of Gauss-Hermite quadrature rules
A package for fast, numerically-stable computation of Gauss-Hermite quadrature rules
This package provides functions to compute Gauss-Hermite quadrature rules very quickly with a higher degree of numerical stability (tested up to 2000 nodes).
package
Details
It also provides function for adaptive Gauss-Hermite quadrature, extending Laplace approximations (as in Liu & Pierce 1994).
Package:
fastGHQuad
Type:
Package
License:
MIT
LazyLoad:
yes
Examples
# Get quadrature rulerule <- gaussHermiteData(1000)# Find a normalizing constantg <-function(x)1/(1+x^2/10)^(11/2)# t distribution with 10 dfaghQuad(g,0,1.1, rule)# actual is1/dt(0,10)# Find an expectationg <-function(x) x^2*dt(x,10)# t distribution with 10 dfaghQuad(g,0,1.1, rule)# actual is 1.25