Functions and code examples to serve as a shared library for Berry Consultants
This R walkthrough guides through data generation, prior calibration and posterior simulation for a piecewise exponential model with a NDLM for the underlying dose-response curve.
Highlights from this walkthrough include:
Note: the piecewise exponential model can be fitted as a Poisson regression with a reparametrization trick. However, in practice I have observed that the model fitting procedure proposed here (using the likelihood explicitly) is not only faster but is also mixing better when run with the same number of iterations.