Hi everyone,

This is my first post here on the forum so please let me know if I am missing something or you want me to be more explicit about my problem.

I have used Rstan now for a couple of months now and really enjoy it but I have run into some problems with my ODE model. I am modelling the labelled fraction of two population and how that fraction changes over time.

Now, when I try to infer the posteriors of the parameter I run into either one of the two following problems. Around 1/5 to 1/4 of the post burn-in transitions are divergent or one of the chains gets â€śtrappedâ€ť in an area of low probability and all transitions are divergent.

Due to biological constraints I have imposed two contraints such that 0 <= pn-tr_delta <= 1 and 0 <= 2^k * tr_delta*R + ps <= 1 . I have been reading on your old mailinglist and here and I guess that these constraints might be part of the problem.

Since I am quite new to modelling in gerneral and Stan in particular I was wondering if you could help me and point me in the right direction to make my model work.

I am open to any kind of critic and suggestions.

Thanks already for your help

Jonas

Stan_model.stan (3.2 KB)