Error when estimating parameters in a multi-level ODE model

Your values are not Float64 so stop trying to force them to be. Instead just write generic statements, i.e. theta = Vector{T}(undef, length(n)), convert(T, false ? theta[i] : theta[i]).

Or better yet, you might want to follow the Bayesian Differential Equation tutorials from the Turing page:

https://turing.ml/dev/tutorials/10-bayesiandiffeq/

2 Likes