Welcome @dan_r . These models are a bit outside my area but a few things:
The divergent transition primer is here:
This post is outdated, see Runtime warnings and convergence problems for an improved and expanded version
So you got:
Warning: There were XXXX divergent transitions after warmup.
What does it mean? What to do?
Divergent transitions are a signal that there is some sort of degeneracy; along with high Rhat/low n_eff and “max treedepth exceeded” they are the basic tools for diagnosing problems with a model. Divergences almost always signal a problem and even a small number of divergences cannot…
and contains lots of good information.
Here Bounding posterior output of pharmacokinetic model - #30 by dbarneche some discussion about the same type of model.
Those two posts might get you going in the right direction. I suspect a slightly larger simulated data set will help troubleshoot the model. We generally recommend starting with simulated data so you know the true parameters.
3 Likes