# NOT RUN {
data(sp_bgsmtr_example_data)
names(sp_bgsmtr_example_data)
# }
# NOT RUN {
# Run the example data with Gibbs sampling and compute Bayesian FDR as follow:
fit_mcmc = sp_bgsmtr(X = sp_bgsmtr_example_data$SNP_data,
Y = sp_bgsmtr_example_data$BrainMeasures, method = "MCMC",
A = sp_bgsmtr_example_data$neighborhood_structure, rho = 0.8,
FDR_opt = TRUE, WAIC_opt = TRUE,lambdasq = 1000, iter_num = 10000)
# MCMC estimation results for regression parameter W and estimated Bayesian FDR summaries
fit_mcmc$Gibbs_W_summaries
fit_mcmc$FDR_summaries
# The WAIC could be also obtained as:
fit_mcmc$WAIC
# Run the example data with mean field variational Bayes and compute Bayesian FDR as follow:
fit_mfvb = sp_bgsmtr(X = sp_bgsmtr_example_data$SNP_data,
Y = sp_bgsmtr_example_data$BrainMeasures, method = "MFVB",
A = sp_bgsmtr_example_data$neighborhood_structure, rho = 0.8,FDR_opt = FALSE,
lambdasq = 1000, iter_num = 10000)
# MFVB estimated results for regression parameter W and estimated Bayesian FDR summaries
fit_mfvb$MFVB_summaries
fit_mfvb$FDR_summaries
# The corresponding lower bound of MFVB method after convergence is obtained as:
fit_mfvb$lower_boud
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab