# Examples should be fast and reproducible for CRAN checks
set.seed(123)
# Example 1: Clayton Copula (toy example)
U_clayton <- Copula_errors(n = 200, type = "Clayton", dim = 2, param = 2)
head(U_clayton)
# Example 2: t-Copula with degrees of freedom (toy example)
U_t <- Copula_errors(
n = 200, type = "t", dim = 2, param = 0.7,
extra_params = list(df = 4)
)
head(U_t)
# Example 3: Multivariate Normal Copula (dim = 3)
# normalCopula() expects the upper-triangular correlations as a vector:
# (rho_12, rho_13, rho_23) for dim=3
rho_vec <- c(0.5, 0.3, 0.4)
U_normal <- Copula_errors(n = 200, type = "Normal", dim = 3, param = rho_vec)
head(U_normal)
Run the code above in your browser using DataLab