# Truncated Student-t distribution
set.seed(5678)
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)
# Example 1: one doubly truncated student-t (nu = 0.80) and Laplace
a = c(-0.8, -Inf, -Inf)
b = c(0.5, 0.6, Inf)
MC11 = mvtelliptical(a, b, mu, Sigma, "t", 0.80) # Student-t
MC12 = mvtelliptical(a, b, mu, Sigma, "Laplace") # Laplace
# Example 2: two doubly truncated student-t (nu = 0.80)
MC12 = mvtelliptical(a, b, mu, Sigma, "t", 0.80) # By default n=1e4
# Truncated Pearson VII distribution
set.seed(9876)
MC21 = mvtelliptical(a, b, mu, Sigma, "PVII", c(1.90,0.80), n=1e6) # More precision
c(MC12$EY); c(MC21$EY)
MC12$VarY; MC21$VarY
# Truncated Normal distribution
set.seed(1234)
MC31 = mvtelliptical(a, b, mu, Sigma, "Normal", n=1e4)
MC32 = mvtelliptical(a, b, mu, Sigma, "Normal", n=1e6) # More precision
Run the code above in your browser using DataLab