Learn R Programming

MomTrunc (version 6.0)

momentsTMD: Moments for doubly truncated multivariate distributions

Description

It computes kappa-th order moments for for some doubly truncated skew-elliptical distributions. It supports the p-variate Normal, Skew-normal (SN) and Extended Skew-normal (ESN), as well as the Student's-t, Skew-t (ST) and the Extended Skew-t (EST) distribution.

Usage

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

Arguments

kappa

moments vector of length \(p\). All its elements must be integers greater or equal to \(0\). For the Student's-t case, kappa can be a scalar representing the order of the moment.

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.

nu

It represents the degrees of freedom for the Student's t-distribution being a positive real number.

dist

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

Value

A data frame containing \(p+1\) columns. The \(p\) first containing the set of combinations of exponents summing up to kappa and the last column containing the the expected value. Normal cases (ESN, SN and normal) return prod(kappa)+1 moments while the Student's t-distribution case returns all moments of order up to kappa. See example section.

Details

Univariate case is also considered, where Sigma will be the variance \(\sigma^2\).

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

onlymeanTMD,meanvarTMD,momentsFMD,meanvarFMD,dmvSN,pmvSN,rmvSN, dmvESN,pmvESN,rmvESN, dmvST,pmvST,rmvST, dmvEST,pmvEST,rmvEST

Examples

Run this code
# NOT RUN {
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 = momentsTMD(c(2,0,1),a,b,mu,Sigma,dist="normal")
value2 = momentsTMD(c(2,0,1),a,b,mu,Sigma,dist = "t",nu = 7)
value3 = momentsTMD(c(2,0,1),a,b,mu,Sigma,lambda = c(-2,0,1),dist = "SN")
value4 = momentsTMD(c(2,0,1),a,b,mu,Sigma,lambda = c(-2,0,1),tau = 1,dist = "ESN")

# }
# NOT RUN {
#T cases with kappa scalar (all moments up to 3)
value5 = momentsTMD(3,a,b,mu,Sigma,nu = 7,dist = "t")
value6 = momentsTMD(3,a,b,mu,Sigma,lambda = c(-2,0,1),nu = 7,dist = "ST")
value7 = momentsTMD(3,a,b,mu,Sigma,lambda = c(-2,0,1),tau = 1,nu = 7,dist = "EST")
# }

Run the code above in your browser using DataLab