# NOT RUN {
data("example_eQTL", package = "BayesSUR")
hyperpar <- list( a_w = 2 , b_w = 5 )
set.seed(9173)
fit <- BayesSUR(Y = example_eQTL[["blockList"]][[1]],
X = example_eQTL[["blockList"]][[2]],
data = example_eQTL[["data"]], outFilePath = tempdir(),
nIter = 100, burnin = 50, nChains = 2, gammaPrior = "hotspot",
hyperpar = hyperpar, tmpFolder = "tmp/" )
## check output
# Plot the estimators from the fitted object
# }
# NOT RUN {
estimators <- getEstimator(fit, estimator = c("beta","gamma","Gy"))
plot(estimators)
#Set up temporary work directory for saving a pdf figure
td <- tempdir()
oldwd <- getwd()
setwd(td)
# Produce authentic math formulas in the graph
plot(estimators, fig.tex = TRUE)
system(paste(getOption("pdfviewer"), "ParamEstimator.pdf"))
setwd(oldwd)
# }
# NOT RUN {
# }
Run the code above in your browser using DataCamp Workspace