onlymeanTMD: Mean for doubly truncated multivariate distributions

View source: R/USER_onlymeanTMD.R

onlymeanTMDR Documentation

Mean for doubly truncated multivariate distributions

Description

It computes the mean vector for some doubly truncated skew-elliptical distributions. It supports the p-variate Normal, Skew-normal (SN), Extended Skew-normal (ESN) and Unified Skew-normal (SUN) as well as the Student's-t, Skew-t (ST), Extended Skew-t (EST) and Unified Skew-t (SUT) distribution.

Usage

onlymeanTMD(lower = rep(-Inf, length(mu)),upper = rep(Inf,length(mu)),mu,Sigma,
             lambda = NULL,tau = NULL,Gamma = NULL,nu = NULL,dist)

Arguments

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 pxp 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.

Gamma

a correlation matrix with dimension qxq. It must be provided only for the SUN and SUT cases. For particular cases SN, ESN, ST and EST, we have that Gamma == 1 (see examples at the end of this help).

nu

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

dist

represents the truncated distribution to be used. The values are normal, SN , ESN and SUN for the doubly truncated Normal, Skew-normal, Extended Skew-normal and Unified-skew normal distributions and, t, ST , EST and SUT for the for the doubly truncated Student-t, Skew-t, Extended Skew-t and Unified skew-t distributions.

Details

Univariate case is also considered, where Sigma will be the variance σ^2. Normal case code is an R adaptation of the Matlab available function dtmvnmom.m from Kan & Robotti (2017) and it is used for p<=3. For higher dimensions we use proposal in Galarza (2022b).

Value

It returns the mean vector of length p.

Note

Degrees of freedom must be a positive integer. If nu >= 300, Normal case is considered."

Author(s)

Christian E. Galarza <cgalarza88@gmail.com> and Victor H. Lachos <hlachos@uconn.edu>

Maintainer: Christian E. Galarza <cgalarza88@gmail.com>

References

Galarza, C. E., Lin, T. I., Wang, W. L., & Lachos, V. H. (2021). On moments of folded and truncated multivariate Student-t distributions based on recurrence relations. Metrika, 84(6), 825-850.

Galarza-Morales, C. E., Matos, L. A., Dey, D. K., & Lachos, V. H. (2022a). "On moments of folded and doubly truncated multivariate extended skew-normal distributions." Journal of Computational and Graphical Statistics, 1-11 <doi:10.1080/10618600.2021.2000869>.

Galarza, C. E., Matos, L. A., Castro, L. M., & Lachos, V. H. (2022b). Moments of the doubly truncated selection elliptical distributions with emphasis on the unified multivariate skew-t distribution. Journal of Multivariate Analysis, 189, 104944 <doi:10.1016/j.jmva.2021.104944>.

Kan, R., & Robotti, C. (2017). On moments of folded and truncated multivariate normal distributions. Journal of Computational and Graphical Statistics, 26(4), 930-934.

See Also

momentsTMD, meanvarFMD, momentsFMD,dmvESN,rmvESN

Examples

a = c(-0.8,-0.7,-0.6)
b = c(0.5,0.6,0.7)
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 = onlymeanTMD(a,b,mu,Sigma,dist="normal")

# Now works for for any nu>0
value2 = onlymeanTMD(a,b,mu,Sigma,dist = "t",nu = 0.87)

value3 = onlymeanTMD(a,b,mu,Sigma,lambda = c(-2,0,1),dist = "SN")
value4 = onlymeanTMD(a,b,mu,Sigma,lambda = c(-2,0,1),tau = 1,dist = "ESN")
value5 = onlymeanTMD(a,b,mu,Sigma,lambda = c(-2,0,1),tau = 1,nu = 4,dist = "EST")

#Skew-unified Normal (SUN) and Skew-unified t (SUT) distributions

Lambda = matrix(c(1,0,2,-3,0,-1),3,2) #A skewness matrix p times q
Gamma  = matrix(c(1,-0.5,-0.5,1),2,2) #A correlation matrix q times q
tau    = c(-1,2)                      #A vector of extension parameters of dim q

value6 = onlymeanTMD(a,b,mu,Sigma,lambda = Lambda,tau = c(-1,2),Gamma = Gamma,dist = "SUN")
value7 = onlymeanTMD(a,b,mu,Sigma,lambda = Lambda,tau = c(-1,2),Gamma = Gamma,nu = 4,dist = "SUT")

#The ESN and EST as particular cases of the SUN and SUT for q=1

Lambda = matrix(c(-2,0,1),3,1)
Gamma  = 1
value8 = onlymeanTMD(a,b,mu,Sigma,lambda = Lambda,tau = 1,Gamma = Gamma,dist = "SUN")
value9 = onlymeanTMD(a,b,mu,Sigma,lambda = Lambda,tau = 1,Gamma = Gamma,nu = 4,dist = "SUT")

round(value4,2) == round(value8,2)
round(value5,2) == round(value9,2)

MomTrunc documentation built on June 16, 2022, 1:06 a.m.