set.seed(1)
p <- 3
Sigma <- diag(p)
# Normal
dat_n <- simulateData(n = 200, beta = 0.5, gamma = c(0.2,-0.1),
sigma.y = 0.5, distribution = "normal")
# Student-t
dat_t0 <- simulateData(n = 200, beta = 0.5, gamma = c(0.2,-0.1),
sigma.y = 0.5, distribution = "t", df = 7)
# Exponential
dat_e <- simulateData(n = 200, beta = 0.5, gamma = c(0.2,-0.1),
sigma.y = "0.3 * abs(X) + 0.1", distribution = "exponential")
Run the code above in your browser using DataLab