Package 'mvvg'

Title: Matrix-Variate Variance-Gamma Distribution
Description: Rudimentary functions for sampling and calculating density from the matrix-variate variance-gamma distribution.
Authors: Samuel Soon [aut, cre]
Maintainer: Samuel Soon <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2025-02-19 04:44:12 UTC
Source: https://github.com/cran/mvvg

Help Index


Calculate Matrix-Variate Variance Gamma Density

Description

Determines density of observations from a Matrix-variate variance gamma (MVVG) distribution, under the identifiability constraint set by [].

Usage

dmvvg(X, M, A, Sigma, Psi, gamma, log = FALSE)

Arguments

X

p×qp \times q observed matrix value

M

p×qp \times q location matrix

A

p×qp \times q skewness matrix

Sigma

p×pp \times p covariance matrix

Psi

q×qq \times q covariance matrix

gamma

scalar mixing parameter

log

returns log-likelihood if TRUE, default is FALSE.

Details

MVVG samples are formulated through the normal variance-mean mixture M+WA+WZM + WA + \sqrt{W}Z, where WGamma(γ,γ)W \sim Gamma(\gamma, \gamma).

Gamma must be >0>0. Sigma and Psi must be positive definite covariance matrices.

Value

dmvvg returns the probability density corresponding to the inputted values and parameters.

Author(s)

Samuel Soon

See Also

rmvvg

Examples

M <- cbind(rep(1, 5), c(1, 0, 1, 0, 1))
A <- matrix(c(1,2), 5, 2, byrow = TRUE)
Sigma <- diag(5)
Psi <- matrix(c(4,2,2,3), 2, 2)
gamma <- 3

X <- rmvvg(1, M, A, Sigma, Psi, gamma)[[1]]
dmvvg(X, M, A, Sigma, Psi, gamma)

Example Matrix

Description

5×25 \times 2 matrix intended for use as an example in dmvvg.

Usage

example_matrix

Format

An object of class matrix (inherits from array) with 5 rows and 2 columns.

Author(s)

Samuel Soon


Generate Matrix-Variate Variance Gamma Samples

Description

Generates random samples from the matrix-variate variance gamma (MVVG) distribution, under the identifiability constraint set by [].

Usage

rmvvg(n, M, A, Sigma, Psi, gamma)

Arguments

n

number of observations

M

p×qp \times q location matrix

A

p×qp \times q skewness matrix

Sigma

p×pp \times p covariance matrix

Psi

q×qq \times q covariance matrix

gamma

scalar mixing parameter

Details

MVVG samples are formulated through the normal variance-mean mixture M+WA+WZM + WA + \sqrt{W}Z, where WGamma(γ,γ)W \sim Gamma(\gamma, \gamma).

Gamma must be >0>0. Sigma and Psi must be positive definite covariance matrices.

Value

rmvvg returns a list of random samples.

Author(s)

Samuel Soon

See Also

dmvvg

Examples

M <- cbind(rep(1, 5), c(1, 0, 1, 0, 1))
A <- matrix(c(1,2), 5, 2, byrow = TRUE)
Sigma <- diag(5)
Psi <- matrix(c(4,2,2,3), 2, 2)
gamma <- 3

rmvvg(2, M, A, Sigma, Psi, gamma)