# Generate and print multivariate normal datasets with diagonal
# variance-covariance matrices.
n <- c(75, 100, 125, 150, 175)
Theta <- list(pdf1 = rep("normal", 4),
theta1.1 = c(10, 12, 10, 12),
theta2.1 = c(1, 1, 1, 1),
pdf2 = rep("normal", 4),
theta1.2 = c(8.5, 10.5, 8.5, 10.5),
theta2.2 = c(1, 1, 1, 1),
pdf3 = rep("normal", 4),
theta1.3 = c(12, 14, 12, 14),
theta2.3 = c(1, 1, 1, 1),
pdf4 = rep("normal", 4),
theta1.4 = c(13, 15, 7, 9),
theta2.4 = c(2, 2, 2, 2),
pdf5 = rep("normal", 4),
theta1.5 = c(7, 9, 13, 15),
theta2.5 = c(3, 3, 3, 3))
simulated <- RNGMIX(Dataset.name = paste("simulated_", 1:25, sep = ""),
rseed = -1,
n = n,
Theta = Theta)
simulated
# Generate and print multivariate normal datasets with unrestricted
# variance-covariance matrices.
n <- c(200, 50, 50)
Theta <- list(pdf1 = rep("normal", 3),
theta1.1 = c(0, 0, 0),
theta2.1 = c(9, 0, 0, 0, 4, 0, 0, 0, 1),
pdf2 = rep("normal", 3),
theta1.2 = c(-6, 3, 6),
theta2.2 = c(4, -3.2, -0.2, -3.2, 4, 0, -0.2, 0, 1),
pdf3 = rep("normal", 3),
theta1.3 = c(6, 6, 4),
theta2.3 = c(4, 3.2, 2.8, 3.2, 4, 2.4, 2.8, 2.4, 2))
simulated <- RNGMIX(model = "RNGMVNORM",
Dataset.name = paste("simulated_", 1:2, sep = ""),
rseed = -1,
n = n,
Theta = Theta)
simulated
# Generate and print multivariate mixed continuous-discrete dataset.
n <- c(400, 100, 500)
Theta <- list(pdf1 = c("lognormal", "Poisson", "binomial", "Weibull"),
theta1.1 = c(1, 2, 10, 2),
theta2.1 = c(0.3, NA, 0.9, 3),
pdf2 = c("lognormal", "Poisson", "binomial", "Weibull"),
theta1.2 = c(3.5, 10, 10, 10),
theta2.2 = c(0.2, NA, 0.1, 7),
pdf3 = c("lognormal", "Poisson", "binomial", "Weibull"),
theta1.3 = c(2.5, 15, 10, 25),
theta2.3 = c(0.4, NA, 0.7, 20))
simulated <- RNGMIX(Dataset.name = paste("simulated_", 1:5, sep = ""),
rseed = -1,
n = n,
Theta = Theta)
simulated
# Generate and print univariate mixed Weibull dataset.
n <- c(75, 100, 125, 150, 175)
Theta <- list(pdf1 = "Weibull",
theta1.1 = 12,
theta2.1 = 2,
pdf2 = "Weibull",
theta1.2 = 10,
theta2.2 = 4.1,
pdf3 = "Weibull",
theta1.3 = 14,
theta2.3 = 3.2,
pdf4 = "Weibull",
theta1.4 = 15,
theta2.4 = 7.1,
pdf5 = "Weibull",
theta1.5 = 9,
theta2.5 = 5.3)
simulated <- RNGMIX(Dataset.name = "simulated",
rseed = -1,
n = n,
Theta = Theta)
simulated
Run the code above in your browser using DataLab