Nonlinear Mixed-Effects Models


I was wondering if anyone has tried to implement nonlinear mixed effects (NLME) models in PyMC before? I’m particularly interested in the kind using in pharmacokinetic / pharmacodynamic (PKPD) modelling, typically implemented in licensed softwares like NONMEM / Monolix.

If it’s not been done before, does PyMC have the capabilities for the required estimation methods? These can be done by maximum likelihood estimation (with first-order conditional estimation (FOCE) or the Laplacian approximation of the likelihood function) for population parameters and then Bayesian mode a posteriori estimates for individual parameters. Alternatively, it can be done via expectation maximisation of the likelihood, typically via stochastic approximation estimation maximisation (SAEM) which uses MCMC sampling and simulated annealing. Are these methods broadly supported by PyMC so that I could specify the NLME framework myself?

Many thanks!