Bayesian inference in a subset of parameters using Turing.jl

Hi everyone. I am working on a large system of ODEs with ~100 parameters. I identified the sensitive parameters with Sobol method, and I would be interested in performing Bayesian inference on them, while keeping the non-sensitive parameters constant. Is there a way to do Bayesian inference on a subset of parameters using Turing.jl? I organize my parameters using ComponentArrays.jl

Thank you in advance!

Just make a subset of the parameters be what is used in the Turing model and do

realp = [turingp;constantp]
ODEProblem(f,u0,tspan,realp)

and it’ll only fit the turingp.

Thanks Chris. However, Turing still needs the constant parameters to be defined inside the model function if I understand correctly (I get an error: ERROR: UndefVarError: k1 not defined) in the constant variables.
Also, how is Turing dealing with the right order in the parameters?

Elaborating on Chris’s answer, you can do something like this:

@model function fit_ode(data, constantp)
    turingp ~ WhateverPriors()
    allp= [turingp; constantp]
    prob = ODEProblem(f,u0,tspan,allp)
    sol = solve(prob)
    data ~ SomeObservationDistribution(sol)
end

Thank you. I resolved the issue, but I am getting warning regarding convergence (dt<=dtmin). What are usual causes for this in Turing? I work with synthetic data so it might be an issue (?)

Check the parameters externally to Turing