The files needed to obtain results for a simulated example are 'demo.R' and 'mcmc.cpp'. 'mcmc.cpp' is a file written in C++ and can be sourced to R. To utilize its functions, one needs to install package 'Rcpp', 'RcppArmadillo', and 'rgen'. The file 'demo.R' shows all the packages needed besides those for 'mcmc.cpp'. The detailed steps are follows:

Step 1: install all the packages: 'Rcpp', 'RcppArmadillo', 'rgen', 'MASS', and 'MCMCpack'.

Step 2: place 'demo.R' and 'mcmc.cpp' in the same folder or change the path of 'Rcpp::sourceCpp('mcmc.cpp')' if they are not placed in the same folder.

Step 3: Source the 'demo.R' to R.