I would like to create parameters that change with time t.
In the classic SIR model below for example, I would like to have a beta that changes: say there are two betas and a dummy variable that indicates when to use which beta.
function sir_ode!(du,u,p,t)
(S,I,R,C) = u
(β,c,γ) = p
N = S+I+R
infection = β*c*I/N*S
recovery = γ*I
@inbounds begin
du[1] = -infection
du[2] = infection - recovery
du[3] = recovery
du[4] = infection
end
nothing
end;
I could do this by not using an ODE solver and simply looping over a discretised code above. But for later I would like to do this with the model description above, so that I can use the turing packages.