mvn2ll: Multivariate Normal - Two Log-Likelihood

Description Usage Arguments Details Author(s) References See Also

View source: R/mvn.R

Description

Calculates the two log-likelihood of \mathbf{X} following a mutivariate normal distribution.

Usage

1
mvn2ll(X, mu, Sigma, neg = TRUE)

Arguments

X

Numeric matrix. Values of the k-dimensional random variable \mathbf{X}.

mu

Numeric vector. Location parameter mean vector \boldsymbol{μ} of length k.

Sigma

Numeric matrix. k \times k variance-covariance matrix \boldsymbol{Σ}.

neg

Logical. If TRUE, returns, negative two log-likelihood.

Details

The two log-likelihood for the multivariate normal (or multivariate Gaussian, or joint normal) distribution is given by

2 \ln \mathcal{L} ≤ft( \boldsymbol{μ}, \boldsymbol{Σ} \mid \mathbf{X} \right) = 2 \mathcal{l} ≤ft( \boldsymbol{μ}, \boldsymbol{Σ} \mid \mathbf{X} \right) \\ 2 \mathcal{l} ≤ft( \boldsymbol{μ}, \boldsymbol{Σ} \mid \mathbf{X} \right) = - \ln ≤ft( | \boldsymbol{Σ} | \right) - ≤ft( \mathbf{x} - \boldsymbol{μ} \right)^{\prime} \boldsymbol{Σ}^{-1} ≤ft( \mathbf{x} - \boldsymbol{μ} \right) - k \ln ≤ft( 2 π \right) %(\#eq:dist-mvn2ll)

with k-dimensional random vector \mathbf{X} \in \boldsymbol{μ} + \textrm{span}≤ft(\boldsymbol{Σ}\right) \subseteq \mathbf{R}^k, \boldsymbol{μ} is the location parameter mean ≤ft( \boldsymbol{μ} \in \mathbf{R}^k \right), and \boldsymbol{Σ} is the variance-covariance matrix ≤ft( \boldsymbol{Σ} \in \mathbf{R}^{k \times k} \right).

The negative two log-likelihood is given by

-2 \mathcal{l} ≤ft( \boldsymbol{μ}, \boldsymbol{Σ} \mid \mathbf{X} \right) = \ln ≤ft( | \boldsymbol{Σ} | \right) + ≤ft( \mathbf{x} - \boldsymbol{μ} \right)^{\prime} \boldsymbol{Σ}^{-1} ≤ft( \mathbf{x} - \boldsymbol{μ} \right) + k \ln ≤ft( 2 π \right) . %(\#eq:dist-mvnneg2ll)

Author(s)

Ivan Jacob Agaloos Pesigan

References

Wikipedia: Multivariate Normal Distribution

See Also

Other mutivariate normal likelihood functions: mvnll(), mvnpdf()


jeksterslabds/jeksterslabRdist documentation built on Aug. 9, 2020, 7:33 a.m.