Purpose: to check that drjacoby returns the prior distribution when no likelihood is used.
Four parameters, each representing a different one of the four possible parameter transformations internally. Each parameter is given a suitable informative prior over it’s domain.
Parameters dataframe:
df_params <- define_params(name = "real_line", min = -Inf, max = Inf,
name = "neg_line", min = -Inf, max = 0,
name = "pos_line", min = 0, max = Inf,
name = "unit_interval", min = 0, max = 1)
Likelihood and prior:
output_sub <- subset(mcmc$output, phase == "sampling")
# real_line
hist(output_sub$real_line, breaks = 100, probability = TRUE, col = "black", main = "real_line")
x <- seq(-5, 5, l = 1001)
lines(x, dnorm(x), col = 2, lwd = 2)
# neg_line
hist(output_sub$neg_line, breaks = 100, probability = TRUE, col = "black", main = "neg_line")
x <- seq(-100, 0, l = 1001)
lines(x, dgamma(-x, shape = 5, scale = 5), col = 2, lwd = 2)