Jacobian/Gradient Function




I am trying to implement Generalized Fiducial Inference into STAN. I was wondering if there already exists a function to calculate the Jacobian.


There is such a function in the Stan Math Library, but it is not exposed to the Stan language. So, you would either need to define your own C++ function that uses it or write the derivatives out in the Stan language. Let us know how it goes. I have never been able to figure out why someone would want to do GFI, but also always thought you would need to use Stan in order to do it.