Rn_normalDensity-class: An S4 class to represent the function...

Rn_normalDensity-classR Documentation

An S4 class to represent the function \frac{1}{\sqrt{(2\pi)^n\det(\Sigma)}}\exp(-((\vec{x}-\vec{\mu})^{T}\Sigma^{-1}(\vec{x}-\vec{\mu}))/2) on R^n

Description

Implementation of the function

f \colon R^n \to (0,\infty),\, \vec{x} \mapsto f(\vec{x}) = \frac{1}{\sqrt{(2\pi)^n\det(\Sigma)}}\exp(-((\vec{x}-\vec{\mu})^{T}\Sigma^{-1}(\vec{x}-\vec{\mu}))/2),

where n \in \{1,2,3,\ldots\} is the dimension of the integration domain R^n = \times_{i=1}^n R. In this case the integral is know to be

\int_{R^n} f(\vec{x}) d\vec{x} = 1.

Details

The instance needs to be created with three parameters representing the dimension n, the location vector \vec{\mu} and the variance-covariance matrix \Sigma which needs to be symmetric positive definite.

Slots

dim

An integer that captures the dimension

mean

A vector of size dim with real entries.

sigma

A matrix of size dim x dim that is symmetric positive definite.

Author(s)

Klaus Herrmann

Examples

n <- as.integer(3)
f <- new("Rn_normalDensity",dim=n,mean=rep(0,n),sigma=diag(n))

multIntTestFunc documentation built on April 19, 2023, 5:07 p.m.