log_post <- function(x) dnorm(x, log = TRUE)
res <- twalk(log_post, n_iter = 2000, x0 = -2, xp0 = 2)
calculate_diagnostics(
res$all_samples,
burnin_frac = 0.2,
param_names = "theta",
title = "Standard normal"
)
Run the code above in your browser using DataLab