blob: a72a1f21405894840a0388325bdc34d53913e8fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/distrib.R
\name{GHquad}
\alias{GHquad}
\title{Gauss-Hermite quadrature weights}
\usage{
GHquad(n)
}
\arguments{
\item{n}{Integer, the number of nodes}
}
\value{
A list with two components:
\item{Z}{the list of nodes}
\item{w}{the corresponding weights}
}
\description{
\code{GHquad} computes the quadrature weights for integrating against a
Gaussian distribution.
}
\details{
if f is a function, then with(GHquad(100), crossprod(f(Z), w))
will compute \eqn{\frac{1}{\sqrt{2\pi}}\int_-\infty^\infty f(x)e^{-\frac{x^2}{2}}\,dx}.
}
|