| visualize_results | R Documentation |
Produces trace plots, marginal densities and joint plots depending on the dimension of the parameter space.
visualize_results(
samples,
true_values = NULL,
title = "Results",
burnin_frac = 0.2,
true_covariance = NULL,
show_acf = TRUE
)
samples |
Matrix of MCMC samples. |
true_values |
Optional vector of true parameter values. |
title |
Plot title. |
burnin_frac |
Burn-in fraction. |
true_covariance |
Optional true covariance matrix. |
show_acf |
Logical; whether to display autocorrelation plots. |
log_post <- function(x) dnorm(x, log = TRUE)
res <- twalk(log_post, n_iter = 2000, x0 = -2, xp0 = 2)
visualize_results(
res$all_samples,
true_values = 0,
title = "Standard normal"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.