Hi everyone

I am totally new to stan/rstan and I am considering fitting my compartmental, deterministic ODE model in stan (HMC).

- In which code block does the solver function (
`integrate_ode_rk45()`

) go? in the example in the user guide on this website, the integration happens in the`model{}`

block, but every example I found online has the integration in`transformed parameters{}`

. - I have a quite complex model, which first runs an ODE model until the states reach equilibrium. This means I simulate for a prespecified time and then check the resulting states. The simulation is extended until some conditions are satisfied.

These equilibrium states are then used as inits in a second ODE model. Is it possible to code this in stan? The fitting happens on one state variable in the second ODE model.

Thank you for your help!

Best, Fabienne