To address the original question, there isn’t anything equivalent to TMB in Julia yet. For those who aren’t familiar, TMB (https://arxiv.org/pdf/1509.00660.pdf; GitHub - kaskr/adcomp: AD computation with Template Model Builder (TMB)) is a software package that fits statistical models, typically using maximum likelihood (MCMC is also available). You write your model as a templated C++ function that returns a log-likelihood (log-posterior density if you’re Bayesian). in that sense, it is similar in spirit to @Tamas_Papp’s DynamicHMC.jl
. TMB uses the CppAD package to take derivatives and can integrate out arbitrary sets of parameters (typically any random effects) using the Laplace approximation. The primary interface is through R. This function is then maximized, typically using R
’s optim
or similar. glmmTMB
defines a few common models.
We have many of the pieces in place to do something similar in Julia. Distributions.jl
defines most of the probability density functions you could ever want, Optim.jl
has a robust set of optimization algorithms, including those that can use gradient and Hessian information. I’m not quite sure what the higher-order autodiff story is at this point. TMB uses up to third derivatives to get gradients of the Laplace-approximated expected densities. I think the biggest missing piece at this point is a package for doing Laplace approximations.