# NOT RUN {
Sigma1 <- intercorr2(k_cat = 1, k_cont = 1, method = "Polynomial",
constants = matrix(c(0, 1, 0, 0, 0, 0), 1, 6), marginal = list(0.3),
support = list(c(0, 1)), rho = matrix(c(1, 0.4, 0.4, 1), 2, 2),
quiet = TRUE)
# }
# NOT RUN {
# 1 continuous mixture, 1 binary, 1 zero-inflated Poisson, and
# 1 zero-inflated NB variable
# The defaults of pois_eps <- nb_eps <- 0.0001 are used.
# Mixture of N(-2, 1) and N(2, 1)
constants <- rbind(c(0, 1, 0, 0, 0, 0), c(0, 1, 0, 0, 0, 0))
marginal <- list(0.3)
support <- list(c(0, 1))
lam <- 0.5
p_zip <- 0.1
size <- 2
prob <- 0.75
p_zinb <- 0.2
k_cat <- k_pois <- k_nb <- 1
k_cont <- 2
Rey <- matrix(0.35, 5, 5)
diag(Rey) <- 1
rownames(Rey) <- colnames(Rey) <- c("O1", "M1_1", "M1_2", "P1", "NB1")
# set correlation between components of the same mixture variable to 0
Rey["M1_1", "M1_2"] <- Rey["M1_2", "M1_1"] <- 0
Sigma2 <- intercorr2(k_cat, k_cont, k_pois, k_nb, "Polynomial", constants,
marginal, support, lam, p_zip, size, prob, mu = NULL, p_zinb, rho = Rey)
# }
Run the code above in your browser using DataLab