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 inempirical_bayes
to choose initial estimates. - Allow user to pass
init_randeffs
toJointMAP
as a vector ofNamedTuple
s. - 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 callingPumas.center_stat(dist)
for a given distributiondist
- Make input order consistent for
center_randeffs
,init_randeffs
,zero_randeffs
, andsample_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
icoef
s more useful in theDataFrame
based oninspect
. Previouslyicoef
s would only be populated at covariate times, but now they will be populated at all times in theDataFrame
output. - Make constant covariates available in
@random
to enable more flexible random effects definitions. - Use
Optim.LBFGS
as default optimization algorithm forJointMAP
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
andMvNormal
to avoid inappropriately calculating shrinkage for non-Gaussian random effects where the interpretation is unclear. - Allow for
ensemblealg
input inicoef
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
inPDiagDomain
such thatzero(n,n)
can be used in the parameterNamedTuple
when simulating.
Documentation and error messages
- Improve
findinfluential
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
andtime
columns are not present in the input toread_pumas
and do the same foramt
whenevent_date==true
. - Add missing backtick in
infer
-docstring forMarginalMCMC
. - Throw an error if a block in
@emmodel
is defined twice. - Fix
vpc
docstring that referencedensemblealg
twice. - Avoid tabs in formula printing for
PumasEMModel
. - Fix
show
method forFittedPumasEMModel
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 ininfer
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 infit
s 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
andtruncated_latent
. - Clarify
event_data
comment in docstring ofread_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 infit
continuation withJointMAP
. - Convert parameters of
RealDomain
s 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 inPumasEMModel
s. https://github.com/PumasAI/Pumas.jl/pull/4087 - Fix a bug where the order of ODE parameters in
PumasEMModel
s internals would sometimes be wrong causing incorrect model evaluations. - Fix
show
method forfit
results if there areInf
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
inSubject
constructor. Previously, it would be:right
for subjects constructed from subjects through theSubject(subject;...)
constructor. - Fix
empirical_bayes
forMAP(NaivePooled())
. Previously, an error would be thrown. - Fix conversion of
PumasEMModel
toPumasModel
. Previously, the reported parameters in the model output would not be correct. - Fix
Subject
constructors withmissing
covariates. Previously, an error would be thrown. - Respect likelihood approximation setting in
MarginalMCMC
. - Fix
LogitNormal
and supportMvLogitNormal
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 simulatedstderror
andvcov
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 anddiscard
should be used to trim bayesian samples insteadzero_randeffs(model, param, population)
is deprecated andzero_randeffs(model, population, param)
should be used insteadinit_randeffs
is deprecated in favor ofcenter_randeffs
.