# NOT RUN {
set.seed(1234)
n <- 100
M <- 1000
x <- runif(n, 1, 2)
y1 <- 0.25 * x + rnorm(100)
y2 <- rpois(n, exp(0.25 * x))
formula.list <- list(y1 ~ 0 + x, y2 ~ 0 + x)
family.list <- list(gaussian(), poisson())
data = data.frame(y1, y2, x)
## Perform copula regression sampling with default
## (noninformative) priors
sample <- bayescopulaglm(
formula.list, family.list, data, M = M
)
predict(sample, newdata = data)
# }
Run the code above in your browser using DataLab