Release Notes for Pumas 2.5.0

Pumas

Features and significant changes

  • Add support for the FOCE approximation for Beta error models. This allows for faster and more robust fitting of models with Beta error models that would previously rely on the LaplaceI approximation.
  • Change the default value of covariates_direction to :left (Last Observation Carried Forward, LOCF) instead of :right (Next Observation Carried Backward, NOCB) as was the default before. The old default causes confusion in the way covariates are used in the model. A very significant use-case where this is often incorrectly set is when there are inter occasion variability in the model.
  • Support time-after-dose (tad) in VPCs as well as stratification over the dose counter (dosenum). (Stratified) Time-after-dose VPC plots are often more informative than just using "model time", and previously it would require the user to construct their own covariates before fitting. These "covariates" (tad and dosenum) are now always available in the vpc call.
  • Implement a new parallelization choice for Bayesian inference: EnsembleSplitThreads. It uses distributed parallelization (like EnsembleDistributed) across chains and multithreading over subjects within each chain. This method allows for faster sampling in many circumstances than pure EnsembleDistributed or EnsembleThreads.
  • Default to length of data in findinfluential. This allows the user to see all loglikelihood evaluations instead of only the five largest unless the k keyword was set.
  • Add a function apply_stat that can be used to conveniently calculate statistics such as mean and var across vectors of NamedTuples. This allows for easy summarization of estimates for vectors of model fits such as those coming from bootstrap, covariate selection, or stochastic simulation and re-estimation (SSE) workflows.

Bug fixes and minor improvements

  • Throw an error in read_pumas in a case where ii=0 but it was not allowed because ss=1.
  • Avoid reusing the same sampler and mass matrix across chains in serial Markov Chain Monte Carlo (MCMC).
  • Fix an issue where covariate information was not correctly passed on to all model blocks (reported in https://discourse.pumas.ai/t/covariates-in-emmodel-diagnostics/919)
  • Change the way derivative information is propagated through models that are solved by numerical integrators. Previously, some models could not be solved due to numerical rounding errors in the solver step sizes around tstops with no way to work around it for users.
  • Allow users to pass saveat in diffeq_options for solve.
  • Fixed a bug where multihreaded vcov incorrectly added the penalty term for the prior for each subject instead of once per population when using MAP.
  • Sooner and more frequent mass matrix adaptation in Markov Chain Monte Carlo (MCMC) in Bayesian workflows.
  • Use the Cholesky factorization when computing the inverse of the Hessian in vcov.
  • Improve support of keyword arguments in functions called in @pre block. Previously f(;a = 1, b = 2) would not be allowed only the version without ; (f(a = 1, b = 2).
  • Improve read_pumas docstring by expanding the explanation of possible inputs and options.
  • Improve BayesMCMC docstring by expanding the explanation of settings related to the mass matrix adaptation procedure.
  • Improve the @options docstring by explaining what each possible option does and the default values the options have.
  • Improve DataFrame constructor docstrings to cover more cases for Pumas related input types.
  • Print the dynamical system type in the model and fit output. The possible cases are: closed form, linear system of ODEs (matrix exponential solution), and nonlinear system of ODEs.
  • Fix a bug that caused predict to throw an error if the input was a fitted model and a new population. The previous error was a DimensionMismatch error. Now, the function call will return predictions for the new population input using the estimates from the fitted model.

Pumas Utilities

Features

  • Update sim_plot, observations_vs_time, subject_fits to set separate = true in the recipe.
  • Add legends to plots by default. Can be turned off with the keyword include_legend = false.

Bug fixes and minor improvements

  • Improve LOESS approximation for plots with small values on the first axis.
  • Add fallbacks to many plots with fitted models as input to give a more user friendly error. Usually, this happens when the plotting function expects an input generated by inspect.

Bioequivalence

Features

Bug fixes and minor improvements

NCA

Features

Bug fixes and minor improvements