eval.gauss: Evaluation of multivariate normal distributed integral

Description Usage Arguments Details Value See Also Examples

Description

Evaluates a given function with a (built-in) multivariate normal prior distribution by Gauss-Hermite quadrature.

Usage

1
eval.gauss(FUN = function(x) 0, X = NULL, W = NULL, debug = FALSE, ...)

Arguments

FUN

(Likelihood) function of the parameters to be estimated. Defaults to funtion(x) 1, in which case only the built-in multivariate normal pdf is evaluated.

X

Matrix of quadrature points, see init.gauss. Alternatively, the list of quadrature points and weights produced by init.gauss.

W

Vector of weights, or NULL if provided in X.

...

Additional arguments passed on to FUN.

prior

Covariance matrix.

Details

The evaluated function is assumed to have a multivariate normal distribution, with a given mean vector and covariance matrix. The default identity function function(x) 1 reduces to an integral over a multivariate normal distribution with mean vector mu and covariance matrix Sigma.

Value

A vector with the value evaluated integrals.

See Also

init.gauss for creating quadrature points.

Examples

1
2
3
4
5
quadPoints <- init.gauss(Q=3)
# expected value of 3-dimensional multivariate normal distribution: N(0,1).
# (Since mean is currently fixed at zero, this is always zero.)
(integral <- eval.gauss(Q=3,X=quadPoints))
round(integral)

Karel-Kroeze/MCAT documentation built on May 8, 2019, 4:50 p.m.