| Type: | Package | 
| Title: | Matrix-Variate Variance-Gamma Distribution | 
| Version: | 0.1.0 | 
| Description: | Rudimentary functions for sampling and calculating density from the matrix-variate variance-gamma distribution. | 
| License: | MIT + file LICENSE | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| RoxygenNote: | 7.3.1 | 
| Imports: | MixMatrix, nlme, psych | 
| Suggests: | knitr, rmarkdown | 
| NeedsCompilation: | no | 
| Packaged: | 2024-11-18 20:58:53 UTC; soonsk | 
| Author: | Samuel Soon [aut, cre] | 
| Maintainer: | Samuel Soon <samksoon2@gmail.com> | 
| Depends: | R (≥ 3.5.0) | 
| Repository: | CRAN | 
| Date/Publication: | 2024-11-19 12:20:27 UTC | 
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 | 
 | 
| M | 
 | 
| A | 
 | 
| Sigma | 
 | 
| Psi | 
 | 
| 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 + \sqrt{W}Z, where W \sim Gamma(\gamma, \gamma).
Gamma must be >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
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 \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 | 
 | 
| A | 
 | 
| Sigma | 
 | 
| Psi | 
 | 
| gamma | scalar mixing parameter | 
Details
MVVG samples are formulated through the normal variance-mean mixture M + WA + \sqrt{W}Z, where W \sim Gamma(\gamma, \gamma).
Gamma must be >0. Sigma and  Psi must be positive definite covariance matrices.
Value
rmvvg returns a list of random samples.
Author(s)
Samuel Soon
See Also
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)