Learn R Programming

MomTrunc (version 5.97)

dprmvESN: Multivariate Extended-Skew Normal Density, Probablilities and Random Deviates Generator

Description

These functions provide the density function, probabilities and a random number generator for the multivariate extended-skew normal (ESN) distribution with mean vector mu, scale matrix Sigma, skewness parameter lambda and extension parameter tau.

Usage

dmvESN(x,mu=rep(0,length(lambda)),Sigma=diag(length(lambda)),lambda,tau=0)
pmvESN(lower = rep(-Inf,length(lambda)),upper=rep(Inf,length(lambda)),
        mu = rep(0,length(lambda)),Sigma,lambda,tau,log2 = FALSE)
rmvESN(n,mu=rep(0,length(lambda)),Sigma=diag(length(lambda)),lambda,tau=0)

Arguments

x

vector or matrix of quantiles. If x is a matrix, each row is taken to be a quantile.

n

number of observations.

lower

the vector of lower limits of length \(p\).

upper

the vector of upper limits of length \(p\).

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.

log2

a boolean variable, indicating if the log2 result should be returned. This is useful when the true probability is too small for the machine precision.

References

Cao, J., Genton, M. G., Keyes, D. E., & Turkiyyah, G. M. (2019) "Exploiting Low Rank Covariance Structures for Computing High-Dimensional Normal and Student- t Probabilities" <https://marcgenton.github.io/2019.CGKT.manuscript.pdf>.

Galarza C.E., Matos L.A., Dey D.K. & Lachos V.H. (2019) On Moments of Folded and Truncated Multivariate Extended Skew-Normal Distributions. Technical report. ID 19-14. University of Connecticut <https://stat.uconn.edu/tech-reports-2019/>.

Genz, A., "Numerical computation of multivariate normal probabilities," Journal of Computational and Graphical Statistics, 1, 141-149 (1992) <doi:10.1080/10618600.1992.10477010>.

See Also

dmvSN, pmvSN, rmvSN, meanvarFMD,meanvarTMD,momentsTMD

Examples

Run this code
# NOT RUN {
#Univariate case
dmvESN(x = -1,mu = 2,Sigma = 5,lambda = -2,tau = 0.5)
rmvESN(n = 100,mu = 2,Sigma = 5,lambda = -2,tau = 0.5)
#Multivariate case
mu = c(0.1,0.2,0.3,0.4)
Sigma = matrix(data = c(1,0.2,0.3,0.1,0.2,1,0.4,-0.1,0.3,0.4,1,0.2,0.1,-0.1,0.2,1),
               nrow = length(mu),ncol = length(mu),byrow = TRUE)
lambda = c(-2,0,1,2)
tau = 2
#One observation
dmvESN(x = c(-2,-1,0,1),mu,Sigma,lambda,tau)
rmvESN(n = 100,mu,Sigma,lambda,tau)
#Many observations as matrix
x = matrix(rnorm(4*10),ncol = 4,byrow = TRUE)
dmvESN(x = x,mu,Sigma,lambda,tau)

lower = rep(-Inf,4)
upper = c(-1,0,2,5)
pmvESN(lower,upper,mu,Sigma,lambda,tau)
# }

Run the code above in your browser using DataLab