PR info will be stripped in the PR

Features and improvements

  • Add the parallel absorption two compartment model Depots2Central1Periph1
  • Add the three compartment model Central1Periph2
  • Add steady state options to diffeq_options to set tolerances for steady state calculations.
  • Allow for init_randeffs input in empirical_bayes to choose initial estimates.
  • Allow user to pass init_randeffs to JointMAP as a vector of NamedTuples.
  • Support deconstruction of variables in @pre such as η₁, η₂ = η to unpack and provide elementwise names to a multidimensional random effect.
  • Require the number of samples to be set when using simobs` with only a model/bayesresult and subject/population input to avoid the confusing default of 10 samples.
  • Print convergence measure instead of Successful Minimization: true/false in fit output.
  • Introduce sample_params for inference to enable simulation with uncertainty in a more controlled way.
  • Introduce center_randeffs for more appropriate initialization of random effects in the non-Gaussian case. The choice of "center" for each distribution can be found by calling Pumas.center_stat(dist) for a given distribution dist
  • Make input order consistent for center_randeffs, init_randeffs, zero_randeffs, and sample_randeffs (see deprecations at the bottom of this page).
  • Use the same solver and tolerances between simobs and fit.
  • Extend StatsAPI.pvalue to be used with the output of lrtest.
  • Make icoefs more useful in the DataFrame based on inspect. Previously icoefs would only be populated at covariate times, but now they will be populated at all times in the DataFrame output.
  • Make constant covariates available in @random to enable more flexible random effects definitions.
  • Use Optim.LBFGS as default optimization algorithm for JointMAP due to the large number of parameters to be optimized.
  • Only support whitelisted diffeq_options settings to avoid users from setting options that might not be compatible with the internal handling of integrator options used in Pumas. Supported options are: :alg, :abstol, :reltol, :maxiters, :continuity, :ss_abstol, :ss_reltol, :ss_maxiters.
  • Add symbolic_jacobian (default: false) to @options to enable symbolic calculation of the Jacobian of the ODE system.
  • Show what's fixed and optimized in tables derived from fit calls.
  • Support events with zero bolus doses (amt = 0).
  • Restrict eta shrinkage computation to Normal and MvNormal to avoid inappropriately calculating shrinkage for non-Gaussian random effects where the interpretation is unclear.
  • Allow for ensemblealg input in icoef when empirical bayes estimates will be computed.
  • Made the gradient calculation slightly more efficient by changing the order of the linear algebra operations.
  • Reordered some checks for finite likelihood and gradients to not evaluate the initial likelihood several times when fitting.
  • Support a zero Matrix in PDiagDomain such that zero(n,n) can be used in the parameter NamedTuple when simulating.

Documentation and error messages

  • Improvefindinfluential docstring to cover supported inputs.
  • Add docstring to NaivePooled to clarify how and when to use it.
  • Better error messages for non-sensical Bayesian cross-validation method specifications.
  • Always error if id and time columns are not present in the input to read_pumas and do the same for amt when event_date==true.
  • Add missing backtick in infer-docstring for MarginalMCMC.
  • Throw an error if a block in @emmodel is defined twice.
  • Fix vpc docstring that referenced ensemblealg twice.
  • Avoid tabs in formula printing for PumasEMModel.
  • Fix show method for FittedPumasEMModel that would fail if the model had multiple endpoints with different numbers of parameters.
  • Improve docstrings of closed form models in general.
  • Abort simulation if steady-state computation fails to converge.
  • Improve docstring of MarginalMCMC and inherit likelihood approximation in infer by @devmotion in https://github.com/PumasAI/Pumas.jl/pull/4242
  • Add missing docstrings for loglikelihood by @devmotion in https://github.com/PumasAI/Pumas.jl/pull/4247
  • Fix typo in warning when using adjust_evid34 and print the warnings only once.
  • Document Pumas definition of eta-shrinkage in docstring of ηshrinkage.
  • Clarify docstring of init_randeffs (see deprecations below).
  • Document the keyword init_randeffs used to initialize the empirical bayes estimate optimization in fits docstring.
  • Fix log message generated by simobs(::BayesMCMCResult)` that would previously throw an error.
  • Throw descriptive error if absorption lag time is negative.
  • Add examples for truncation and censoring in the docstring of censored_latent and truncated_latent.
  • Clarify event_data comment in docstring of read_pumas.
  • Fix typo in error message when ByObservation(allsubjects = true) is used and subjects have different numbers of observations.
  • Add a warning in the docstring for Constrained to clarify that the type should only be used in @param.

Bugs

  • Fix checks for unbounded parameters in gsa such that an appropriate error is thrown.
  • Respect iterations setting in fit continuation with JointMAP.
  • Convert parameters of RealDomains to floating point numbers to support integer input.
  • Forward RNG to AdvancedHMC.find_good_stepsize to ensure reproducibility of bayesian inference.
  • Fix support of NamedTuples of random effects in PumasEMModels. https://github.com/PumasAI/Pumas.jl/pull/4087
  • Fix a bug where the order of ODE parameters in PumasEMModels internals would sometimes be wrong causing incorrect model evaluations.
  • Fix show method for fit results if there are Inf values among estimates.
  • Fix simulation with zero omegas used to turn off specific random effects.
  • Fix a bug where user might get the error message ERROR: UndefVarError: terminate! not defined in Pumas.jl when using steady-state.
  • Fix FOCE type inference inefficiencies that could cause a small overhead in some situations.
  • Fix PSDDomain constructor with diagonal matrices.
  • Fix estimation of absorption lag model with non-constant covariates that would throw an error for an unsupported Event constructor.
  • Fix inconsistent covariates_direction in Subject constructor. Previously, it would be :right for subjects constructed from subjects through the Subject(subject;...) constructor.
  • Fix empirical_bayes for MAP(NaivePooled()). Previously, an error would be thrown.
  • Fix conversion of PumasEMModel to PumasModel. Previously, the reported parameters in the model output would not be correct.
  • Fix Subject constructors with missing covariates. Previously, an error would be thrown.
  • Respect likelihood approximation setting in MarginalMCMC.
  • Fix LogitNormal and support MvLogitNormal random effects. Previously, an internal transformation to orthogonal representations would be incorrect.
  • Fix display and analysis of MCMC samples without population parameters.
  • Fix covariates output in DataFrame(::SimulatedObservations). Previously, covariate information would only be added if the subject also had events.
  • Use center_stat(dist) as the random effect value for population predictions instead of zero. This is more appropriate for non-Gaussian random effects.
  • Fix return code of analytical solution that would sometimes return an indication of success even if the solution was not found.
  • Fix inspect DataFrame constructor for parameters defined directly in @random. Previously, an error would be thrown if the parameter defined in @random was used directly in the model later on without being redefined in @pre.
  • Correctly handl constant parameters (instead of ignoring the constantcoef) in simulated stderror and vcov calculations.
  • Fix checks and handling of reserved identifiers :id and :time in read_pumas.
  • Fix a bug in the calculation of the correaltions in correlation_diagnostic.
  • Make linearity detection safer and faster. Previously, linearity detection could fail and an error would be thrown. Some rare edge cases could also lead to a false positive linearity detection.
  • Fix NaivePooled and restrict it to transformed Gaussians.
  • Fix parsing of @covariates in @emmodel.

Deprecations

  • The method simobs(fpm) is deprecate and the full signature should be used instead: simobs(fpm.model, fpm.data, coef(fpm)).
  • Pumas.truncate is deprecated and discard should be used to trim bayesian samples instead
  • zero_randeffs(model, param, population) is deprecated and zero_randeffs(model, population, param) should be used instead
  • init_randeffs is deprecated in favor of center_randeffs.