Hi everyone,
Does anyone know how we can define the derivatives of a function in Stan? Any suggestion? I want to have \dot{F}(t) = U(T). Many thanks.
Best,
Ellie
Hi everyone,
Does anyone know how we can define the derivatives of a function in Stan? Any suggestion? I want to have \dot{F}(t) = U(T). Many thanks.
Best,
Ellie
Is it that you want to enforce the constraint F’(t) = U(t)? This might be possible, but depends a lot on what you’re trying to do.
Or that you want to take a derivative of a function? Stan doesn’t do this for you (it’s autodiff stuff isn’t exposed inside the models), but you might get mileage out of a symbolic differentiation package.
If you want to calculate the values of F from known U(t) (and initial conditions), you’re talking about solving an ordinary differential equation, look in the manual about ODE solvers.