Learn R Programming

MomTrunc (version 4.59)

meanvarFMD: Mean and variance for folded multivariate distributions

Description

It computes the mean vector and variance-covariance matrix for the folded p-variate Normal, Skew-normal (SN), Extended Skew-normal (ESN) and Student's t-distribution.

Usage

meanvarFMD(mu,Sigma,lambda = NULL,tau = NULL,dist,nu = NULL)

Arguments

mu

a numeric vector of length \(p\) representing the location parameter.

Sigma

a numeric positive definite matrix with dimension \(p\)x\(p\) representing the scale parameter.

lambda

a numeric vector of length \(p\) representing the skewness parameter for SN and ESN cases. If lambda == 0, the ESN/SN reduces to a normal (symmetric) distribution.

tau

It represents the extension parameter for the ESN distribution. If tau == 0, the ESN reduces to a SN distribution.

dist

represents the folded distribution to be computed. The values are normal, SN , ESN and t for the doubly truncated Normal, Skew-normal, Extended Skew-normal and Student's t-distribution respectively.

nu

It represents the degrees of freedom for the Student's t-distribution.

Value

It returns a list with three elements:

mean

the mean vector of length \(p\)

EYY

the second moment matrix of dimensions \(p\)x\(p\)

varcov

the variance-covariance matrix of dimensions \(p\)x\(p\)

Warning

The mean can only be provided when nu is larger than 2. On the other hand, the varcov matrix can only be provided when nu is larger than 3.

Details

Normal case by default, i.e., when dist is not provided. Univariate case is also considered, where Sigma will be the variance \(\sigma^2\).

References

Kan R. & Robotti C. (2017) On Moments of Folded and Truncated Multivariate Normal Distributions, Journal of Computational and Graphical Statistics, 26:4, 930-934.

C.E. Galarza, L.A. Matos, D.K. Dey & V.H. Lachos. (2019) On Moments of Folded and Truncated Multivariate Extended Skew-Normal Distributions. Technical report. ID 19-14. University of Connecticut.

See Also

momentsFMD, meanvarFMD, meanvarTMD, cdfFMD,dmvESN,rmvESN

Examples

Run this code
# NOT RUN {
mu = c(0.1,0.2,0.3)
Sigma = matrix(data = c(1,0.2,0.3,0.2,1,0.4,0.3,0.4,1),
               nrow = length(mu),ncol = length(mu),byrow = TRUE)
value1 = meanvarFMD(mu,Sigma,dist="normal")
value2 = meanvarFMD(mu,Sigma,dist = "t",nu = 4)
value3 = meanvarFMD(mu,Sigma,lambda = c(-2,0,1),dist = "SN")
value4 = meanvarFMD(mu,Sigma,lambda = c(-2,0,1),tau = 1,dist = "ESN")
# }

Run the code above in your browser using DataLab