ldmvnorm: Multivariante Normal: log-density

Description Usage Arguments Value Author(s) Examples

Description

Considering a Multivariate Normal Distribution calculates the log-density

ld = -0.5 * (n * log(2 * π) * log(|Σ|) + y^T Σ y)

Usage

1
ldmvnorm(y, mu, E)

Arguments

y

observations, numeric or reference object of class 'number'

mu

mean vector, numeric of reference object of class 'number'

E

covariance matrix, numeric of reference object of class 'number'

Value

Returns a 'numeric' or a reference object of class 'number'

Author(s)

Filippo Monari

Examples

1
2
3
4
5
6
7
8
modello.init(10, 10, 10, 10)
y = number(rnorm(10))
mu = number(rep(0, 10))
E = number(diag(1, 10))
ld = ldmvnorm(y, mu, E)
print(ld)
print(ld$v)
modello.close()

modello documentation built on Feb. 2, 2021, 9:06 a.m.

Related to ldmvnorm in modello...