vignettes/checks_normal_model.Rmd
checks_normal_model.Rmd
## Registered S3 method overwritten by 'GGally':
## method from
## +.gg ggplot2
Purpose: to compare drjacoby infered posterior distribution against the exact analytical solution for a very simple model.
A vector of data x
drawn from a normal distribution with
unknown mean mu
and known variance of 1.0.
Likelihood and prior:
Parameters dataframe:
df_params <- define_params(name = "mu", min = -1, max = 1)
mcmc <- run_mcmc(data = data_list,
df_params = df_params,
loglike = "loglike",
logprior = "logprior",
burnin = 1e3,
samples = 1e5,
chains = 10,
silent = TRUE)
# extract sampling draws
mu_draws <- subset(mcmc$output, phase = "sampling")$mu
## Warning: In subset.data.frame(mcmc$output, phase = "sampling") :
## extra argument 'phase' will be disregarded