babelmixr2 0.1.11.9000
Each estimation method now carries
typeanddescriptionattributes so it appears in the category-grouped method list nlmixr2est prints for an unsupportedest=(or a barenlmixr2()call):nonmem,monolix,pknca,fmeMcmcandpseudoOptimunder “External”,saemixunder “Stochastic EM”,nlmerunder “Integral approximation”, andpopedunder “Optimal Design”.The mu-referenced covariate algorithm (
muRefCovAlg) is now applied through thenlmixr2estpreprocessing/post-final-object hooks instead of explicitnlmixr2est::.uiApplyMu2()/.uiFinalizeMu2()calls in thesaemix,nonmem,monolix, andnlmerestimation methods (#184). Thenonmemandmonolixmethods gained themumethod attribute so the hooks fire for them.The
nlmerestimation method now prints its iterations during thelme4::nlmeroptimization and records a parameter history, both driven by the sharednlmixr2estnlm machinery (not lme4). Each recordednlmerSolveGrad()evaluation logs the population parameter estimate (per-subject mean of thephicolumns) into the resident nlm scale; the accumulated history is recovered vianlmixr2est::nlmGetParHist()and stored on the fit asparHistData. No objective column is shown (lme4 owns the deviance). Iteration printing defaults on (nlmerControl(print = 1L)). Requiresnlmixr2est (>= 6.2.0).The
pseudoOptimControl()andfmeMcmcControl()functions now accept either the legacy scalarprint/printNcol/useColorarguments or a pre-builtnlmixr2est::iterPrintControl()object viaprint. Internally the control list stores a singleiterPrintControlsub-list (matching the upstreamnlmixr2estunification innlmixr2estPR #651), so iteration output from these estimators uses the same shared C++ formatter as every othernlmixr2estestimator. Requiresnlmixr2est (>= 6.0.1).The
iterPrintControlunification now also coversnlmerControl()andsaemixControl().nlmerControl()gains the standardprint/printNcol/useColorarguments (or a pre-builtnlmixr2est::iterPrintControl()object) and feeds the resultingiterPrintControlsub-list to the nlm C solving engine instead of a hard-codedprint = 0L.saemixControl()absorbs its legacyprint(logical),printNcolanduseColorarguments into the sameiterPrintControlsub-list; a nonzeroeveryenables thesaemixprogress output.Fix NONMEM export silently dropping the absorption lag (#190). A
lag(depot)/alag(depot)assignment computed the lag parameter in$PKbut never emitted the correspondingALAG<n>=statement, so NONMEM fit the model without any lag. The lag value is now assigned toALAG<n>in$PK.NONMEM export now announces when a model variable is renamed because it collides with a NONMEM reserved name (e.g. a variable named
alagbecomesRXR1). The rename was previously silent (#190).Added
nlmerestimation method: fits nlmixr2 models vialme4::nlmerusing analytical gradients from rxode2 sensitivity equations. Supports mu-referenced and non-mu-referenced random-effects models. Access vianlmixr(model, data, est = "nlmer"). The underlying lme4 fit is stored asfit$nlmer.Fix integer type safety in C++ source: loop variables and size variables now use
R_xlen_t(signed) orsize_t(unsigned) instead ofint/unsigned intwhere appropriate, preventing potential integer overflow and segfaults for vectors with more than 2^31 elements. The specific crash: ingetDvid(),int j = cmtDvid.size()whencmtDvid.size()≥ 2^31 wraps toINT_MIN, the subsequent decrement jumps toINT_MAX, andcmtDvid[INT_MAX]accesses memory far out of bounds.Add bounds check in
popedSolveIdME()andpopedSolveIdME2()to verify thatmodelSwitchvalues are within the allocated matrix column dimensions (nend), in addition to the existing check against the number of unique IDs in the global time indexer.Remove
qssince it will be archived and replace withqs2.Added
saemixestimation method
babelmixr2 0.1.9
CRAN release: 2025-08-31
Added estimation method
fmeMcmcwhich runsFME::modMCMC(). It is also compatible with thecodapackage; you can convert withas.mcmc(fit)and then run coda tools likecoda::raftery.diag(coda::as.mcmc(fit2)).Added estimation method
pseudoOptimwhich runsFME::pseudoOptim(). This estimation method requires all parameters to be bound.Added bug fix for rstudio completion
babelmixr2 0.1.6
CRAN release: 2025-01-20
Use new nlmixr2est covariate selection enforcement for babelmixr2
Fix a bug where the NONMEM export isn’t working well (#839)
Check loaded
rxode2information and compare to what the loaded model information should be. This allows better checking of which model is loaded and even more robust stability. It requiresrxode2>3.0.2.
babelmixr2 0.1.5
CRAN release: 2024-11-06
Fix bug where
PopEDcould error with certaindvidvaluesFix bug where if/else clauses in the model could cause the model to not predict the values correctly.
Fix bug so that
shrinkage()calculation worksFix bug so that you can mix 2 different
PopEDdata bases in an analysis without crashing R. While this didn’t occur with every database clash, it more frequently occurred when you interleavedPopEDcode between two differentPopEDdatabases, like in issue #131.Added a new function
babelBpopIdx(poped.db, "par")which will get the poped index for a model generated frombabelmixr2, which is useful when calculating the power (as in example 11).
babelmixr2 0.1.4
CRAN release: 2024-09-23
Added experimental
PopEDintegrationRemoved dependence on
rxode2parseImported
monolix2rxfrom themonolix2rxpackageAlso allow conversion of a model imported from monolix to a
nlmixr2fit.
babelmixr2 0.1.3
Changed default NONMEM rounding protection to FALSE
Added a
runoption to themonolixControl()andnonemControl()in case you only want to export the modeling files and not run the models.
babelmixr2 0.1.2
CRAN release: 2023-12-12
Handle algebraic
muexpressionsPKNCA controller now contains
rxControlsince it is used for some translation optionsThis revision will load the pruned ui model to query the compartment properties (i.e. bioavailability, lag time, etc) when writing out the NONMEM model. It should fix issues where the PK block does not define some of the variables and will have a larger calculated variable that can be used in the model instead.
When
nonmem2rxhas a differentlstfile, as long asnonmem2rx::nminfo(file)works, then a successful conversion to anlmixr2fit object will occur.Fix to save parameter history into
$parHistDatato accommodate changes infocei’s output ($parHistis now derived).Changed the solving options to match the new steady state options in
rxode2and how NONMEM implements them. Also changed the iwres model to account for therxerr.instead of theerr.which was updated inrxode2as well.