# Set the random seed.
set.seed(100)
# Simulate the data.
simulated_data <- reg_simulation1(N = 50,
ni_lambda = 8,
beta = c(0.5,0.5,0.5),
beta_b = 1.5,
dsq = 0.1,
sigmasq = 0.5,
delta = 0.6,
nu = 5.89)
y <- simulated_data$y
X <- simulated_data$X
group_info <- c(0,0,0)
# The number of grids (L) for approximating the single index function
L <- 50
N <- length(y)
GP_MCMC_output <- Gibbs_Sampler(X = X,
y = y,
group_info = group_info,
beta_value = c(0.5,0.5,0.5),
beta_prior_variance = 10,
beta_b_value = 1.5,
beta_lambdasq_value = 1,
beta_tausq_value = 1,
xi_value = abs(rnorm(n = L + 1)),
xi_lengthscale_value = 1.0,
xi_tausq_value = 1.0,
g_func_type = "GP",
dsq_value = 1,
sigmasq_value = 1,
delta_value = 0.6,
nu_value = 5.89,
U_value = abs(rnorm(N)),
S_value = abs(rnorm(N)),
loglik_type = "skewT",
gof_K = 10,
gof_L = 5,
iter_warmup = 10,
iter_sampling = 20,
verbatim = TRUE,
update = 10,
incremental_output = FALSE,
incremental_output_filename = NULL,
incremental_output_update = 1e6,
n_core = 1)
Run the code above in your browser using DataLab