View source: R/metropolis_sampler.R
This function implements a simple Metropolis MCMC algorithm.
1 | metropolis_sampler(dist, dist_args, start_vals, iter, burnin)
|
dist |
Distribution to draw from |
dist_args |
List of arguments needed for the posterior, in this case it should be list(y = responde, x = covariates, length_scale, sigma_f, tau2) |
start_vals |
Starting values for the parameters |
iter |
Number of iterations the sampler will run |
burnin |
Number of iterations that will be discarded |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.