Correct. The user-defined functions are user-defined in Stan's
function definition syntax.
It is possible to integrate external functions written in C++, but
you need to be able to compute their gradients with respect to every
input that is going to be a parameter. Usually R functions
don't come with gradients and are not templated in such a way
that we can use them with auto-diff.
- Bob
On Jun 26, 2014, at 9:47 PM, Noah Motion <
noahs...@gmail.com> wrote:
> I can't tell for sure from reading the manual whether or not one could use an external function in a user-defined Stan function. So, for example, it would be very useful if I could use a multivariate normal CDF function from the mnormt R package in a user-defined Stan function. It seems unlikely that just sticking an R (or Fortran, or whatever) function in there would work, but I want to confirm that this is the case.
>
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
stan-users+...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.