Description Usage Arguments Details Value See Also Examples
Evaluates a given function with a (built-in) multivariate normal prior distribution by Gauss-Hermite quadrature.
1 |
FUN |
(Likelihood) function of the parameters to be estimated.
Defaults to |
X |
Matrix of quadrature points, see |
W |
Vector of weights, or |
... |
Additional arguments passed on to FUN. |
prior |
Covariance matrix. |
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
.
A vector with the value evaluated integrals.
init.gauss
for creating quadrature points.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.