l_mvn: Log of the Likelihood of the Multivariate Normal Distribution

Description Usage Arguments Value Author(s) See Also Examples

View source: R/multiNorm-l_mvn.R

Description

Calculates the log of the likelihood function of the multivariate normal distribution.

Usage

1
l_mvn(theta, x)

Arguments

theta

Numeric vector. Parameter vector \boldsymbol{θ} = ≤ft\{ \boldsymbol{μ}, \mathrm{vech} ≤ft( \boldsymbol{Σ} \right) \right\}^{\prime}

x

Numeric vector of length k. The ith vector of observations. Or numeric matrix of size n by k.

Value

A vector.

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other Multivariate Normal Distribution Functions: grad_l_mvn_generic(), grad_l_mvn(), hess_l_mvn_generic(), hess_l_mvn(), l_mvn_generic(), mvn_theta_helper(), negl_mvn(), rmeans_mvn_chol_of_theta(), rmeans_mvn_chol(), rmvn_chol_of_rhocap(), rmvn_chol_of_theta(), rmvn_chol_of_vechsrhocap(), rmvn_chol(), rvcov_mvn_chol(), rvcov_wishart_of_vechsigmacap(), rvcov_wishart()

Examples

 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
26
27
n <- 100
mu <- c(0, 0)
sigmacap <- matrix(
  data = c(
    1, 0.5, 0.5, 1
  ),
  nrow = 2
)
theta <- c(
  mu,
  linearAlgebra::vech(sigmacap)
)
xcap <- rmvn_chol(
  n = n,
  mu = mu,
  sigmacap = sigmacap
)

l_mvn(
  x = xcap[1, ],
  theta = theta
)

l_mvn(
  x = xcap,
  theta = theta
)

jeksterslab/multiNorm documentation built on Dec. 20, 2021, 10:11 p.m.