Stub example for mcmc_ functions

Suppose you generate some MCMC samples of params

library(hayeslib)

num_samples <- 10

postr <- data.frame(alpha = rnorm(num_samples),
                    beta = rnorm(num_samples))

postr %>% 
  mcmc_trace()

Get it to a form that nice for easy mapping

postr %>% 
  t_mcmc()

MCMC simple summary for plotting

postr %>% 
  t_mcmc() %>% 
  mcmc_stats()

Do the plotting

postr %>% 
  t_mcmc() %>% 
  mcmc_stats() %>% 
  mcmc_hpd_int()


alexpghayes/hayeslib documentation built on May 5, 2019, 4:47 p.m.