# NOT RUN {
# Create data based on Vale and Maurelli's method by specifying skewness and kurtosis
dist <- bindDist(skewness = c(0, -2, 2), kurtosis = c(0, 8, 4))
# }
# NOT RUN {
library(copula)
# Create three-dimensional distribution by gaussian copula with
# the following marginal distributions
# 1. t-distribution with df = 2
# 2. chi-square distribution with df = 3
# 3. normal distribution with mean = 0 and sd = 1
# Setting the attribute of each marginal distribution
d1 <- list(df=2)
d2 <- list(df=3)
d3 <- list(mean=0, sd=1)
# Create a data distribution object by setting the names of each distribution
# and their arguments
dist <- bindDist(c("t", "chisq", "norm"), d1, d2, d3)
# Create data by using Gumbel Copula as the multivariate distribution
dist <- bindDist(c("t", "chisq", "norm"), d1, d2, d3, copula = gumbelCopula(2, dim = 3))
# Reverse the direction of chi-square distribution from positively skew to negatively skew
dist <- bindDist(c("t", "chisq", "norm"), d1, d2, d3, copula = gumbelCopula(2, dim = 3),
reverse = c(FALSE, TRUE, FALSE))
# }
Run the code above in your browser using DataLab