Skip to contents

dMod2 0.16.1

  • derivMode alone selects the derivatives a constructor builds: odemodel(), Y(), P(), Pexpl(), Pimpl() and importPEtab() take one or more of "forward" (default), "reverse", "forward-forward" and "forward-reverse", or "none". The build arguments deriv and deriv2 are removed: deriv2 = TRUE is derivMode = "forward-forward", deriv = FALSE is derivMode = "none". Passing deriv or deriv2 is an error.
  • A second-order direction, "forward-forward" or "forward-reverse", builds "forward" as well. "none" combines with no other direction. odemodel(derivMode = "reverse") builds no forward sensitivities. Pimpl() obtains the reverse directions from the forward ones.
  • deriv, deriv2 and sweep of a call keep their meaning. A call that asks for a derivative the function object was built without is an error that names the missing derivMode direction; Y(), Pexpl() and Pimpl() built without first derivatives no longer return values alone on deriv = TRUE.
  • The odemodel object holds the built directions in attr(, "derivMode").

dMod2 0.16.0

  • The plotting theme and color helpers are named after the package: theme_dMod2(), scale_color_dMod2(), scale_fill_dMod2() (with _c and _div), dMod2_colors, dMod2_colors_cb, dMod2_palette(), dMod2_palettes(), dMod2_gradient(), dMod2_divergent() and their _cb forms; the dMod names are gone. theme_dMod2() draws the axis ticks outside the panel.
  • trust() runs the hybrid method of Fides (Fröhlich and Sorger 2022) by default: Gauss-Newton, then BFGS once the trust radius stayed the same for 20 iterations. The BFGS matrix starts from the Gauss-Newton Hessian at the start and is updated along the Gauss-Newton steps, and the radius is kept at the switch. hessianMethod = "gn" keeps plain Gauss-Newton. The sparse path, multiple shooting and boundary = "clip" run Gauss-Newton. mstrust() and profile() follow the default; em() and FOCEI keep Gauss-Newton.
  • New settings of trust() phases: keepRadius starts a phase at the radius of the handover, and onStop = "end" ends the run on a value, model, step or stagnation stop instead of handing over. qnControl$hessianInit = "tracked" starts a later BFGS phase from a BFGS matrix updated over the whole run.
  • trust() with multiple shooting: a stop on stagnation, value, predicted decrease or gradient reports converged = TRUE only where the full step of the condensed model predicts a decrease of at most mtol, as in single shooting.
  • trust() with multiple shooting: after the natural level function hands over to the filter, iterlim bounds both parts together and iterations counts both.
  • A phase of trust() takes radiusStall, the number of consecutive iterations at an unchanged trust radius after which it hands over to the next phase, the switch of the hybrid method of Fides (Fröhlich and Sorger).
  • trust(sparse = TRUE) runs a BFGS phase with qnControl$hessianInit = "gn" as limited-memory BFGS: the sparse Hessian of the objective at the start of the phase, shifted by a multiple of the identity where it is not positive definite, plus the compact correction of Byrd, Nocedal and Schnabel from the last qnMemory pairs, 10 where it is 0, as a low-rank part of the model. sparse = "auto" takes the sparse path only where every phase takes the Hessian of the objective.
  • em() with random effects over several groupings passes every argument of trust() in control$trustControl to the outer search, hessianMethod, phases, switches and qnControl included, and reports phaseIterations. FOCEI of one grouping reads rinit, rmax, iterlim, ftol and mtol; flat ftol, mtol, gtol and xtol join tolControl. Other entries of control$trustControl are an error.
  • em() and msem() take control$inner = "sqp" for FOCEI and for spike-and-slab and Dirichlet-process random effects. The outer search first runs on inexact modes: innerControl$sqpIterlim inner iterations (default 2) from the modes predicted along d eta / d theta, with value and gradient corrected to first order, to the square roots of ftol and mtol. It then continues on converged modes, so estimates, value, gradient and Hessian are those of the nested search. "nested" stays the default. Fits report innerIterations and, with "sqp", sqpIterations.
  • em() and msem() refuse unknown entries of control$quadrature, control$saem and control$innerControl, as of control and control$sparseFit. innerControl takes rinit, rmax, iterlim, steptol, mtol, eigenFloorRelative and sqpIterlim.
  • trust(), trustL1() and mstrust() no longer name the control list of a flat tolerance or quasi-Newton setting such as gtol; like any other argument they do not take, it reaches the objective.
  • symmetryDetection(), symmetryReduction() and discreteSymmetries() need symident 0.17.0.
  • trust() takes the structured quasi-Newton Hessians hessianMethod = "sbfgs" and "ssr1" (Dennis, Martínez and Tapia), the Gauss-Newton Hessian of the objective at every iterate plus a correction learned by a BFGS or an SR1 update, and the hybrids "gnsbfgs" and "gnssr1" (Zhou and Chen), which choose at every accepted step between the Gauss-Newton Hessian alone, or plus the residual norm times the identity with qnControl$qnHybridShift = TRUE, and the structured model. The structured secant is that of Dennis, Martínez and Tapia, (J+ - J)'u+ from the Jacobian J of the predictions and sigmas at the data and the derivatives u of the value in them, generalized to the error models and censored data of normL2(); the other terms of a sum, such as a prior, enter with the gradient and Hessian they return. Objectives asked for hessian = "structured" return these data rows in an entry structure of the objlist, which + stacks; an objective without them gets the secant of gradient and Gauss-Newton Hessian. The BFGS update of "sbfgs" is undamped and restores the secant also where the Gauss-Newton Hessian of the new iterate plus the correction is indefinite along the step. qnControl$qnScaling = "residual" scales the correction with the residual norm |u| (Huschens), qnControl$qnHybridTol sets the switch of the hybrids. The methods run inside phases and through mstrust(); the result reports hybridGN, and evalBySource names the four new sources. trustL1() refuses hessianMethod.
  • distributedComputing() refuses a job whose name a job submitted from another working directory still holds in the folder of a remote node, until that job is purged.
  • terminate() of a dMod2Job on SSH nodes or the local machine sends SIGKILL to the tasks that still run 5 seconds after SIGTERM.
  • trust() and trustL1() end on a convergence stop that the Newton decrease held back where the run then ends on the radius without an accepted step that changes the value by ftol or more, with converged = TRUE. On an objective with noise above mtol, such as a FOCEI marginal, the runs end on that convergence stop at the optimum.
  • trust() and trustL1() end on "stagnation" with converged = TRUE only where the full Newton step of the model predicts a decrease of at most mtol, or where a convergence stop was held back since the last step that changed the value by ftol or more.
  • constraintStability() takes width, the least width of the ramp in the units of the rates, default 0, and margin, the least width relative to the largest eigenvalue modulus, default 1e-6, which replaces the control stabilityMargin of Pimpl(). A wide ramp shows the boundary to the model of a trust-region step before the step crosses it.
  • The gradient of constraintStability() is exact on a defective double eigenvalue, such as that of a chain of states with equal rates: eigenvalues that coincide within the precision of the eigenvalues take the mean of their derivatives, the trace of the spectral projector times the derivative of the Jacobian. The eigenvalues of a Jacobian with large entries are matched within a precision relative to the norm of the Jacobian.
  • With spike-and-slab or Dirichlet-process random effects the marginal is the value at the exact modes to first order: the value depends on the modes at first order, and the gradient the inner search leaves at them is removed by one Newton step on the exact inner Hessian. Value and gradient do not depend on the outer tolerances.
  • The modes of spike-and-slab and Dirichlet-process random effects are found by the C++ group kernel of FOCEI, all groups in one batched prediction per step, and end where the Gauss-Newton step is below 1e-8; control$sparseFit$trustControl sets the outer search only.
  • em(method = "saem") and msem(method = "saem") fit spike-and-slab random effects, also beside normal and Dirichlet-process ones: per-indicator birth and death moves from the local Gaussian model of the data, the other slab values of the group following along the regression of that model, and a joint random walk on the slab values; prob and tau follow in closed form, an estimated tau starts at least at the largest group mode under the slab alone. control$saem$nFlip sets the indicator sweeps per iteration; the acceptance rates of births, deaths and random-walk steps are columns of stageTrace. -2 log L is that of method = "focei" at the estimate, with the inclusion probabilities from the late draws. With many spike-and-slab effects per group the chain can settle with every effect in the slab and prob near 1.
  • logLik(fit, method = "importance") estimates the marginal log-likelihood of a fit with spike-and-slab random effects at the estimates by importance sampling on the model, with standard error and effective sample size per group.
  • em(method = "quadrature") returns the best iterate of the outer loop, not the last.
  • control$quadrature$maxNodes (default 1000): a level with more nodes per group is never evaluated. There the level error is estimated by the change from the level below, and a group above tol / G is capped.
  • converged of a quadrature fit means stationary at the levels reached: the Newton decrement is below tolDecrement (stopReason "decrement"), or -2 log L rose after a step on unchanged levels ("resolution"). A small decrement relative to the summed level error does not end the fit. Capped groups are listed in column capped of stageTrace and certificate, and in attribute "levels" of stageTrace.
  • plotRandomEffects() draws spike-and-slab random effects: type = "inclusion" gives a heatmap of the probability of a deviation per group and effect; "conditional" and "modes" show draws from the conditional mixture against the prior spike and slab.
  • plotTrace() draws the hyperparameters of sparse random effects recorded in the trace.
  • plotPars() takes an em fit or a list of them: estimates with Wald intervals, fits side by side.
  • residuals(type = "NPDE") and plotResiduals() work for fits with sparse random effects only.
  • Objective functions take hessian = "expected": normL2() then returns the expected (Fisher) information of the likelihood in place of the Gauss-Newton Hessian, 2 / sigma^2 in the prediction and 4 / sigma^2 in sigma per data point (Student-t: 2 (nu + 1) and 4 nu over (nu + 3) sigma^2), positive semidefinite also where an error model depends on the parameters. $information of spike-and-slab fits takes it for the terms without random effects.
  • The documentation of em() describes $information of spike-and-slab fits as an empirical information, positive semidefinite, not a Hessian.
  • steadyStates() follows the procedure of Rosenblatt et al. (2016): the cycles of the graph of states are cut first, at a state of a conserved quantity or at a state whose balance is solved for a rate constant of one flux side, and the remaining states and rate constants are solved from balances in amounts. A quantity conserved across compartments is recognized, and networks whose cycles defeated the greedy choice of unknowns are solved. Where no cycle forces a cut, the result solves for states rather than rate constants and can differ in form from earlier versions.
  • steadyStates() solves a state from the balance of that state before cutting cycles, where the solution is a ratio of positive sums and every cycle keeps a cut; the states of conserved quantities are left to the cuts.
  • steadyStates() cuts a flux side whose terms have separate rate constants when no other cut gives a solution: the fluxes of the side keep free ratios r_<state>_<j>, new parameters of the transformation, and one rate constant of the side is solved.
  • em(method = "saem") with spike-and-slab random effects draws each indicator with the slab value integrated out (Gauss-Hermite on the local model, exact model at the nodes, independence Metropolis-Hastings) and takes prob and tau from Rao-Blackwellized statistics; the chain no longer settles with every effect in the slab and prob near 1. p0 is the mean conditional spike probability of the late sweeps. New control$saem$nodes.
  • em(method = "saem") with Dirichlet-process random effects beside spike-and-slab ones takes any number of groups: -2 log L by sequential importance sampling over the partitions with valueSE beyond 14 groups, or with control$saem$integral = "importance".
  • An em fit as init of em(method = "saem") with sparse random effects starts the chain at the selected effects of that fit.
  • em(method = "saem") with sparse random effects reports innerModes, the modes of the approximate marginal at the estimates, and logLik(method = "importance") starts from them, or from etaModes in a fit without them.
  • A BFGS phase of trust() seeded from an indefinite Hessian (hessianInit = "gn" or "exact", or a handover from Gauss-Newton) starts from the absolute values of the Hessian eigenvalues.
  • c() of a parvec names an unnamed operand by the argument name, c(p, z = 1).
  • plotValues(pseudoLog = TRUE) labels every tick as a power of ten where all are, and every tick as a plain number otherwise.
  • discreteSymmetries() handles models with several conditions and events.
  • symmetryDetection(mode = "global") reads a reduction with one trafo per condition, keeps the parameter names in the section and the state maps of a discrete symmetry, and prints the coordinates the section pins.

dMod2 0.15.10

  • constraintStability(pSS, p, weight) penalizes instability only. With s the largest eigenvalue modulus of the Jacobian on the conserved manifold, a ramp of width stabilityMargin * s (default 1e-6 * s) below stabilityTol (default 0) rises as the cube of the distance into it, reaches weight per eigenvalue at stabilityTol and continues linearly in the residual, quadratically in the value. Value, gradient and Gauss-Newton Hessian are continuous. The arguments onset and duration are removed. The attribute "eigenvalues" lists the eigenvalues on the ramp and beyond with their conditions, half-lives and leading states. Steady states count once where they agree in the parameters, resting states and start values they read.

  • Pimpl() takes the control stabilityMargin of controlsPTC; stabilityTol must be a number of at least 0.

  • importPEtab() adds a constraintStability() term to obj for every preequilibration, also returned as stability; stability = FALSE leaves it out.

  • normL2() evaluates hessian = "sparse" in the native chain, with the same sparse Hessian as the R path.

  • trust() and trustL1() end on "gradient", "fvalue" or "preddiff" only where the full Newton step of the model also predicts a decrease of at most mtol, on the positive part of an indefinite or singular Hessian; trustL1() on the model of the coordinates not held at a kink. Otherwise the run goes on within iterlim. mtol = 0 drops the condition.

  • trust() reuses the evaluation of the start also where the start has attributes besides names, and with sparse = "auto" on the dense path as well.

  • importPEtab() passes the states a noise formula reads as outputs of the observation function, so the objective stays in the native chain.

  • em() continues the search for random effects at the boundary only from a reduction it accepts.

  • The volume terms of the FOCEI marginal are computed in C++.

  • symmetryDetection(), symmetryReduction() and discreteSymmetries() need symident 0.15.0.

  • A sum of objective functions called with conditions = NULL evaluates all conditions, as normL2() does.

  • A refined reverse sweep of normL2() sends the chi2 seed of a condition to the backward solve only where it reaches the states differently from the seed of the value; otherwise the value column answers both, correction included.

  • symmetryDetection(mode = "global") analyzes local identifiability, reduces the directions found and counts the values of the coordinates with the same output, with the maps between them, for several conditions and events as well; globalOptions passes the settings of discreteSymmetries(). A model the global analysis does not handle gets the reason in info$discrete$unsupported. Needs symident 0.15.0.

  • symmetryReduction() limits the section search of each block to timeout = 600 seconds by default (Inf lets the search run to the end), and allowOpen and allowChecked default to TRUE: an open or checked direction gives a warning, as in symident 0.15.0.

  • symmetryReduction(branch = ) takes the chart of one side of the fixed set of a discrete symmetry as the trafo; without it the branch charts are in $alternatives. Needs symident 0.15.0.

  • Each direction of symmetryDetection() has a kind by orbit geometry: "scaling", "translation" (constant generator, a line in linear coordinates) or "curved"; print() groups the directions by it.

  • compile() and the remote builds of distributedComputing() compile objects with the CPPFLAGS of the user Makevars, as R CMD SHLIB does; compile() reads the compiler settings anew when the site or user Makevars changes. A source that fails to compile in parallel is an error that names it and shows the compiler output.

dMod2 0.15.9

  • symmetryDetection() and symmetryReduction() need symident 0.14.0. An added, multiplied or replaced dose on a state under a free exponent or a Hill term moves the power of the state with it, at the start and later, also under equilibrate; an initial value such as B*V + D of such a state is accepted. An event value with exp(), log(), a non-integer power, sin(), cos() or tan() of a state reads the state at the event, not the initial value.
  • discreteSymmetries(), or symmetryDetection(discrete = TRUE), searches the discrete symmetries of a detection result, other points of the domain with the same output, and reconstructs the maps between them with the fundamental domain; symmetryReduction() holds them in $discrete. symmetryDetection(knownInputs = ) declares known functions of time.
  • trust() runs one optimizer on dense and sparse Hessians: the sparse path solves the subproblem of the same steps on sparse Cholesky factors and takes every setting of trust() for a Hessian of the objective ("gn", "exact"), bounds and phases included. sparse = "auto" takes it above 100 parameters where a step costs fewer flops than a dense one, by the symbolic factorization; options(dMod2.sparseAuto = list(fill = )) keeps the rule by fill.
  • hessian = "sparse" may return part of a Hessian as a low-rank part lowrank (see objlist()), which trust(), profile(), vcov(), the restricted likelihood of align() and the results of em() add by Woodbury.
  • align() keeps the Hessian of large alignments sparse. The normalization of the values per block enters it as a sparse part plus a low-rank one, and an experiment is split into conditions of at most 16 biological values, so the derivatives per condition stay small.
  • em() and align() with random effects keep the Hessian sparse where a group couples many parameters, as a random scale per gel does: the Schur complement over the random effects of such a group and the curvature of the volume term of the group enter as low-rank parts. FOCEI runs one outer optimizer on dense and sparse Hessians, which reach the same fit.
  • align() with random effects gives standard errors NA instead of an error where the Gauss-Newton information of the random effects is singular.

dMod2 0.15.8

  • laplace() is removed. A Laplace prior has no mass at 0, so the deviations it sets to 0 at the joint mode are not a selection by the marginal likelihood; spikeSlab() and dirichletProcess() select deviations, and trustL1() keeps the L1 penalty. em() takes the settings of the sparse fit in control$sparseFit, formerly control$laplace, and returns no strengths.
  • The guide chapter on sparse random effects is Sparse deviations, the methods article Sparsity priors, both under new addresses. The methods article describes the Dirichlet process as a grouping of the groups and the clustered lasso, fuse of trustL1(), as the penalized counterpart.
  • trustL1(one.sided = TRUE) penalizes values below mu by lambda * (mu - p) and leaves values above free: a parameter on mu stays there only while the objective pulls it down by at most lambda, and mu is no lower bound.
  • profile() does not double a step it has just shrunk.
  • importPEtab() evaluates a prior without the parameterScale prefix on the linear parameter: for a parameter on log or log10 scale at the back-transformed value, without a Jacobian term, as other PEtab tools do. A plain normal or laplace prior on such a parameter is accepted.
  • exportSbml() writes an event with method = "add" or "multiply" as x + value or x * value on the old value.
  • slurmCluster() without walltime leaves out the directive lines of the job script template whose field has no value, so the shipped template runs without one.
  • The flags of compile(args = ) reach the link as well.
  • Composing two functions defined for different single conditions with * is an error.
  • The methods articles, the guide, the example projects and the reference pages are corrected where they did not match the code or the mathematics, among them the partition sum of the Dirichlet process, the hard case of the trust-region subproblem, the regularity of steady-state roots, the scaling test of the symmetry detection and the growth criterion of multiple shooting.
  • The README links the guide chapters instead of repeating them.

dMod2 0.15.7

dMod2 0.15.6

  • symmetryDetection() and symmetryReduction() need symident 0.13.5. The exact proof of a direction expands the identities under a cap on the terms and solves the state components that an initial value set by parameters gives a direction from the parametrization of that value. Under equilibrate, a direction without exact proof is "verified" with an error bound where the resting states lie on one component of each resting variety, and the Lie order is certified for generic values. The order bound counts the points drawn for each random point, in info$orderDraws.

dMod2 0.15.5

  • The jobs of distributedComputing() count a task without result on a node that does not answer, or under a SLURM queue that does not, as running: check() reports it as not reachable, and wait() goes on polling. While a node does not answer, wait() doubles the pause between polls up to 10 minutes.

dMod2 0.15.4

  • Under Xs(optionsReverse = list(refine = TRUE)) the reverse objective of normL2() adds to the value and to chi2 the first-order change from the computed trajectory to the one the refined sweep differentiates, which cppDE reports as correction, so value and gradient belong to one function; that value need not be closer to the exact one. A call with deriv = FALSE sweeps as well. The change is the attribute correction of the result. The sweeps of em() and msem() and multiple shooting run without refine, and em() refuses a prediction with it. Needs cppDE 0.13.12.

dMod2 0.15.3

  • trust() ends with stopReason = "radius" once a step does not change the parameters in floating point, also with the default rmin = 0 and where the value at the iterate differs between evaluations, as the Laplace marginal of em() and msem() can. Under qnControl = list(hessianReseed = "stall") a quasi-Newton phase reseeds first, as at a stall.

  • With sparse random effects, em() and msem() drop the BFGS correction of the model Hessian, in the search of the random effect modes and in the joint fit, when a step shows no positive curvature, so the search returns to the model Hessian.

dMod2 0.15.2

  • The refit in each step of profile() starts at the radius rinit of optControl, also for a parameter on a small scale, such as the validation parameter of a prediction profile.

  • subset() of an equation list keeps a state that a kept reaction does not change but whose rate depends on it, as a catalyst.

  • plotCombined(errfn = ) and plotPrediction(errfn = ) draw the sigma band only where the error model gives a sigma and plot an observable without one.

  • plotArray(fixed = ) adds the parameters held fixed in the profiles to every parameter set, so it plots the predictions along profiles computed with fixed.

dMod2 0.15.1

  • American spelling throughout: trust(stepControl = list(regularize = )) replaces regularise, the attribute run of the result of mstrust() names optimizer and optimizerArgs instead of optimiser and optimiserArgs, and the sequential palette "grey" of [dMod_palettes()] is "gray".

  • wide2long(), %bmm%, rref(), nullZ() and submatrix() are no longer exported, and ggopen() is removed. as.data.frame() of a prediction returns the long format of wide2long(), with a column sigma.

dMod2 0.15.0

  • New constraintStability(pSS, p), a term of the objective that keeps the steady state of a Pimpl() stable: for every eigenvalue of the Jacobian at the steady state on the manifold of the conserved quantities, the square of how far the real part passes an onset, scaled to weight where the real part reaches the stabilityTol of pSS. Zero below the onset, with exact gradient and Gauss-Newton Hessian; the onset defaults to a decay slower than the data last. Pimpl(deriv2 = TRUE) provides the second derivatives it needs. With controlsPTC = list(stability = FALSE) the steady state may be unstable, and the term goes on rising there instead of the evaluation failing.

  • plotValues() takes a named list of fit collections, one panel each and each ranked separately, and with relative draws the values above the best of each collection or above a given value. plotValues(), plotPars() and as.parvec() take the result of mstrust() as it is, and as.parframe() returns a parframe unchanged.

  • align(reml = TRUE) takes the standard errors of the values from the information of the mean parameters alone, the error parameters held at their estimates (Lindstrom and Bates 1990).

  • The integral of em() over sparse random effects is formed in natural parameters, without the center of the quadratic expansion, in C++ group by group where no Dirichlet-process random effect joins groups. The spike-and-slab random effects of a group are integrated exactly, by a depth-first sum over their subsets that leaves out subtrees below a bound, within a budget of nodes instead of a limit on their number. Where the data couple factors, or the sum would exceed the budget, the expectation consistent (EC) approximation runs as a convergent double loop with Newton steps in both loops; EC converges where the data tie coordinates closely or do not see them. Mean field and control$laplace$coupling are gone, with the fallback to mean field.

  • The native evaluation chain takes observables and error models that read time.

  • em() with Laplace, spike-and-slab or Dirichlet-process random effects follows the parameter transformations, steady states, ODE, events, observables and error model from every such random effect to the measured names of the group. One that reaches none of them rests at 0 with the prior: the group searches the mode without it, the integral and the hyperparameter updates leave it out, and $random marks it in a column data. A hyperparameter all of whose random effects reach no data is an error. Every expression is read with the names that are 0 in the condition set to 0, so that a state that starts at 0 and that nothing drives passes no random effect on, and a root of a steady state depends only on the inputs that the equations and conservation rows of the steady state reach.

  • The second derivatives of the Laplace marginal and of the FOCEI volume term by forward over reverse take the gradients of their traces direction by direction, each from a forward pass along one random effect, where that is cheaper than a backward sweep along all of them per random effect.

  • msem(sd = ) takes a vector named by the parameters it perturbs; an unnamed vector of several entries is an error. The table of msem() has the largest absolute entry of the gradient of every start (gradient).

  • em() with sparse random effects finds the modes of the random effects group by group, by trust() where a group has no Laplace coordinates and by trustL1() where it has, in place of one trust region over the random effects of all groups. The search differentiates the model in the random effects of the group only, adds a BFGS correction to the Gauss-Newton Hessian and ends at the tolControl of control$laplace$trustControl, where given. A group starts from the lowest of the predicted modes and the minima found at the last four distinct accepted points, as the inner problem of a group may have several local minima; at the start of the fit and every 25 accepted steps the search also runs from 0 and from two starts around the modes.

  • The model Hessian of the outer trust region of em() with sparse random effects under forward over reverse is built from Gauss-Newton blocks throughout, which keeps it positive semidefinite; the exact rows of the data Hessian in the random effects enter the gradient and the shift of the modes.

  • The fits of em() with sparse random effects count why evaluations of their trust region failed (failures, also a column of the table of msem()). Every start of msem() runs to convergence, all starts at once; msem(budget = ) is gone. msem(which = ) fits a part of the starts, so that tasks of distributedComputing() share one multistart, and get() joins their fits into one.

  • residuals(type = "NPDE") of an em() fit draws a reading at or below the limit given the other readings of the same group, on the Gaussian copula of the simulations, which stay uncensored. The NPDE of a group are then independent under the model also with censored readings. The pde is the mid-rank of a reading among the simulations.

  • detectFreeCores() inside a SLURM job takes the cores the job was given and bound to.

  • Multiple shooting with nodes = "auto" counts a turning point of the data where the replicate means reverse by more than the range that their noise reaches over the series in one draw of a thousand. The noise is that of the replicate means, from sigma where the data have it, else from the replicates or the scatter of the series. Noise on a plateau adds no segments, and oscillations are also counted without sigma.

dMod2 0.14.8

  • Pimpl(): a state whose reactions all vanish at the steady state rests. It takes the value from the input, 0 where the input has none, and is not among the parameters.

  • Alignment models compile into align/<host>_<process>/ of the output directory, so processes that build the same model at once share no file.

  • plotVPC(pc = TRUE) leaves out the readings whose population prediction is not positive. confint(method = "profile") of an em() fit refits with the fit’s derivative mode. The plots of em() fits order their panels as the model and the data do; plotTrace() orders the stages as they ran.

  • msem(retry = TRUE), the default, draws a start again where the fit from it fails, for instance where the steady state of Pimpl() has no stable root at the start, up to nTries attempts; the table of starts has their tries and stop, the test that ended each trust region. keepFits = TRUE returns the fit of every start. The fits of em() have stopReason.

  • align() takes the standard errors of a fit without random terms from the exact Hessian at the fit, and the fallback where the marginal Hessian is not positive definite from the expected information, positive semidefinite by construction.

  • compile() reuses the objects of earlier calls in the same directory.

  • The help pages of the mixed-effects functions have an example each; what takes longer than seconds is not run.

dMod2 0.14.7

  • The website https://dmodverse.github.io/dMod2/ replaces the vignettes. The site guide has eleven chapters: setting up models, symmetries, sensitivities, optimization, profile likelihood, prediction uncertainty, nonlinear mixed-effects models, group-specific effects, alignment of relative data measurements, PEtab import and export, remote computing. The chapters on optimization and on mixed-effects models derive the methods of trust(), mstrust(), trustL1(), multiple shooting, FOCEI, quadrature, Laplace EM and SAEM and compare them. The site also has the reference by topic and the example projects as articles.

  • The applications that were demos are example projects in examples/ of the repository: each folder holds the scripts, the saved fits and a README of one project. New example projects pharmacometrics (theophylline, warfarin and mavoglurant, FOCEI and SAEM multistarts with the diagnostics of em() fits, nlmixr2 on the same model where installed) and TMDD (target-mediated drug disposition with the target at steady state, censored readings, FOCEI and quadrature).

  • License GPL (>= 3).

dMod2 0.14.6

  • align(reml = TRUE), the default: the error parameters, and the hyperparameters of normal random terms, by restricted likelihood. The parameters of the symbols of the prediction are integrated out under a flat prior as by Lindstrom and Bates: in rounds from the maximum likelihood fit, the log determinant of their Gauss-Newton information at the parameters and modes of the previous round enters the objective with an exact gradient, through FOCEI where the model has random terms. Fits with Laplace, spike-and-slab or Dirichlet-process terms and method = "quadrature" stay maximum likelihood; print() and the attribute estimation of fit$parameters say which, fit$remlRounds counts the rounds. Where the information is singular, the fit is by maximum likelihood, with a warning. anova() of alignments refuses restricted likelihoods of fits with different parameters of the prediction.

  • align() goes on from the current fit after a variance is set to 0, and the results have those etas among parameters. Where the Hessian of a fit with random terms is not positive definite at the optimum, the standard errors come from the Gauss-Newton Schur complement over the random effects (fit$seSource).

  • alignmentModel(technical = ) names the columns that tell technical replicates apart, such as lanes. Readings that agree in all other columns but value and lloq are replaced by their mean before the alignment: geometric, on the log scale, for an error model in prediction, arithmetic otherwise; a sample with censored readings is censored at the mean of the sample readings.

  • Alignment models compile into getOption("dMod2.outdir"), and processes that build the same model at once take turns.

dMod2 0.14.5

  • em() sets a variance at the boundary to 0: a normal random effect that forms a block alone and whose standard deviation ends below 0.1 is dropped, the etas of that effect fixed at 0, and the other parameters are fitted again; where that raises -2 log L by at most control$boundary (default 0.1), the fit without it is returned and names the hyperparameter in boundary, which msem() lists per start. The fit stores the random effects in design and the values given as fixed, and em() and msem() take a fit as init and go on from it.

  • FOCEI ends where the trust-region model can gain less than mtol in the largest region the fit allows (rmax), and after five consecutive rejected trials that leave the objective flat within ftol. The inner search for the modes, of FOCEI and of the quadrature, stops where the Newton step is below innerControl$steptol (default 1e-8), so that -2 log L at given parameters does not depend on where the search started. FOCEI over several groupings solves the modes of all components in lock step, with one batched evaluation of the model per round; summary() prints the shrinkage per grouping.

  • em() and msem() stop with an error where -2 log L of the data is not finite at the start, and FOCEI where a Hessian is not finite. A trial point where the prediction fails, or where the value or derivatives there are not finite, is rejected, in the search for the modes for that subject alone; SAEM keeps the parameters of an iteration where the objective fails at the draws.

  • em(method = "quadrature") and Laplace EM factor the Hessian of the modes instead of inverting it, so that a random effect whose standard deviation collapses to 0 ends the fit. A stage of the quadrature ends where the Hessian is not positive definite, where a Newton step on rebuilt nodes would lower -2 log L by less than tolDecrement or than the nodes resolve, or where a step raised -2 log L by more than a Newton step would gain; the stage trace has the resolution.

  • SAEM evaluates the data term of the draws, and the quadrature that of the nodes, in C++ where the model allows it, as FOCEI does.

  • msem(budget = ) caps the outer trust region of FOCEI, also the one before quadrature, at budget times the iterations of the first fit; quadrature, Laplace EM and SAEM keep their own limits.

  • Spike-and-slab random effects have no upper bound per group: up to 12 of a group are integrated jointly and exactly, more each alone, coupled by the expectation consistent (EC) approximation or mean field (coupling in control). With sparse random effects one coupling holds for the whole fit, EC where it converges at the start, else mean field, reported as "meanFieldFallback".

  • An effect formula leaves a condition whose grouping is missing (NA in the branch table) without random effect, at the fixed effects.

  • residuals(fit, type = "NPDE"): normalized prediction distribution errors from simulated data sets, decorrelated per group, censored readings by a uniform draw below their simulated fraction, with the tests of mean, variance and normality as attribute tests. New plotVPC(): visual predictive check of an em() fit, prediction corrected with pc = TRUE, stratified by a column of the condition grid, with the fraction of censored readings. plotResiduals() of an em() fit takes type, any of IWRES, CWRES and NPDE, and plotRandomEffects(fit, covariates = ) plots the random effects against covariates of the groups. The plots of em() fits order the conditions naturally.

  • New data sets warfarin (PK/PD after an oral dose, 32 subjects) and mavoglurant (PK after an intravenous infusion, 120 subjects, 78 on two occasions), from nlmixr2data.

dMod2 0.14.4

  • profile() returns the attribute ends, one row per side with the number of steps and why the side ended: the threshold, a limit, the step limit, or the error of the objective. It solves the path equation with the exact Hessian where the objective returns one with deriv2 = TRUE; deriv2 = FALSE keeps the Gauss-Newton matrix. verbose = TRUE shows the progress toward the threshold of the contribution named by stop.

  • mstrust() warns with the first error when every fit failed.

  • plotCombined(errfn = ) draws one standard deviation of the error model as a band around the prediction. plotData(), plotCombined() and plotPrediction() order the conditions naturally (L2 before L10). A color legend of a single condition, and a legend of plotProfile() or plotPaths() with a single entry, are left out; plotProfile() and plotPaths() keep the order of a list of profiles.

  • symmetryReduction(allowChecked = ) reduces on directions of level "checked", which hold at random points without a proof.

  • distributedComputing() writes the result of a task under a temporary name and renames it once written, so that check() and get() read complete results only; the remote build uses /tmp where TMPDIR names a missing directory. terminate() cancels a SLURM job by job ID.

dMod2 0.14.3

  • trust() also ends on a rejected Newton step from inside the trust region that predicts a decrease below mtol.

  • The sparse trust-region step, and the step of multiple shooting, count a numerically singular factor or a failed solve as not positive definite and take the norm of the step and the curvature along it without under- or overflow: a Hessian with flat directions gives a step on the boundary of the region.

dMod2 0.14.2

  • normL2(data, g * x * p, errmodel = e) evaluates in C++ where x is Xs() of the cppDE backend, Xt(), or Xf() for values alone, g and e come from Y(), and p is any product of Pexpl() and Pimpl(), sums per condition included, or absent: per condition the transformations, the steady states with their derivatives by the implicit function theorem, the batch solve of the model and the data term, in parallel over the conditions on getOption("dMod2.cores"). Value, gradient and Hessian, Gauss-Newton or exact, and the adjoint gradient of sweep = "reverse" equal those of the R evaluation, which every other model takes, as does every model under options(dMod2.evaluation = "R").

  • The parallel regions over conditions run on getOption("dMod2.cores") threads, at most the processors, also for fewer conditions than cores.

  • The checkpoints Xs() keeps for the reverse sweep are limited to twice the widest batch of conditions, at least 4, and freed with cppDE::releaseStore() once they leave the cache or the backward solve of the native chain used them.

  • A sum of objectives in which one term has a value that is not finite returns that value.

  • The option dMod2.batch.check is removed.

dMod2 0.14.1

  • The steady states of Pimpl() are solved in C++ by the solver of cppDE::ptc(), in the native chain for all conditions of an evaluation at once and in parallel on getOption("dMod2.cores"), with the same result on any number of cores. A root depends on the parameters, the states in pars and the controls only, so that an objective is the same function of the parameters in every call; identical values are answered from memory, which keepRoot = FALSE turns off. The control archive and resetWarmStarts() are removed.

  • Pimpl(controlsPTC = list(stabilityTol = )): a root counts as stable while the real part of the leading eigenvalue on the manifold of the conserved quantities is at most stabilityTol, in the units of the rates; default 0.

  • conservedQuantities(eqnlist) replaces getTotals() and conservedQuantities(S) on a stoichiometric matrix. A conserved quantity is an amount: the concentrations enter with the volumes of their compartments, also symbolic ones (1*A+1*V*B). A quantity of a single species is named after it. customTotals() checks the same, and Pimpl() reads the coefficients at the parameters of each call. A state that no reaction changes is a parameter of Pimpl(), not a conserved total.

  • Pimpl() and the PEtab pre-equilibration keep a conserved moiety at the total where the moiety reactions rest, and totals keep the names of the full network.

  • exportPEtab() takes the observables and the error model as observation functions of Y(). exportPEtab(steadyState = ) takes the Pimpl() of the chain and writes the steady state as a pre-equilibration, conditions with equal parameters sharing one; exportPEtab(events = ) writes the events at time 0 that replace a state into the condition table and refuses others. An observable the error model leaves out takes the standard deviations of the observable data, one without data the noise 1, and a fixed parameter that enters p as exp() or 10^() has the value it has in the model.

  • log10Transform(states = ) transforms the states named, all of them by default.

dMod2 0.14.0

  • Breaking: define(), insert(), repar() and branch(apply = ) write a substitution as "lhs <- rhs", e.g. insert(trafo, "x <- exp(x)", x = pars). A "lhs ~ rhs" string or a formula is an error that names the new form; ~ is left to model formulas.

  • evalConditionResidual() with df gives the Student-t likelihood of normT().

  • Random effects as formulas: insert() on a branched transformation takes effect formulas such as cl ~ wt + (1 + dose | p | ID). The symbol is replaced by the linear predictor on the scale the transformation gives it, so after insert(trafo, "x <- exp(x)", x = "cl") the random effects are normal on the log scale. Fixed effects are coded as by model.matrix() over the columns of the branch table, random terms follow lme4 with the IDs of brms for correlation across formulas, gr(ID, dist = ) sets the distribution. x ~ 1 + (1 | ID), x = pars and ka + v ~ ... apply one right-hand side to many symbols. randomEffects() returns the structure from the transformation or from the P() built from it.

  • New normal(), laplace(lambda), spikeSlab(prob, tau) and dirichletProcess(concentration, tau), the distributions of a random term. A spike-and-slab deviation is exactly 0 or, with probability prob, drawn from N(0, tau^2). Under dirichletProcess() the groups share the population value or a common deviation in clusters, with the Ewens prior over the partitions and N(0, tau^2) as base measure. Every hyperparameter left NULL is estimated by marginal maximum likelihood with the other parameters.

  • New em() and msem(), mixed-effects fits as trust() and mstrust(): em(obj, random = randomEffects(p), init, fixed, method) takes the objective of the data and builds the prior itself. A group may own several conditions, conditions without a group enter the fit, random terms over several groupings, nested or crossed, are integrated per connected component, and normal and sparse random effects combine in one fit. Methods:

    • "focei", the Laplace approximation of the marginal with exact gradient, censored data by M3 and random effects in the error model; Laplace, spike-and-slab and Dirichlet-process random effects are integrated on the Schur complement of the normal ones, the partitions of a Dirichlet process summed exactly (at most 14 groups), and sparse random effects of one group that the data couple by expectation consistent (control$laplace$coupling, or mean field as a bound). Their hyperparameters move with the other parameters in one trust region: the Schur complement of the fixed parameters takes the sparse random effects at the curvature of their posterior, the curvature of a hyperparameter puts the Newton step at the M-step, and a BFGS correction learns the missing information. Such fits have no Hessian of the marginal: with Laplace and spike-and-slab random effects vcov() inverts the empirical information of the exact scores of the groups, fit$information, which needs more groups than parameters; with Dirichlet-process ones, whose groups are not independent, vcov() is an error and confint(method = "profile") gives intervals;
    • "quadrature", from the FOCEI fit, on nested sparse grids whose level per group follows control$quadrature$tol, with an importance-sampling certificate per group;
    • "laplaceEM", the same nodes in an ECM;
    • "saem", stochastic approximation with the mu-referenced fixed effects and Omega in closed form; for Dirichlet-process random effects of any number of groups by Gibbs sweeps over the clusters, -2 log L by sequential importance sampling with valueSE.

    msem() perturbs the starts on the scale on which each parameter is unbounded and returns the best fit with the table of starts, which plotValues() draws as a waterfall; cores splits as in mstrust(). The fit from init runs first, and every other start ends after budget (default 5) times the outer iterations of that fit, with converged = FALSE.

  • em() fits report omega (standard deviations and correlations with standard errors), random (the modes per group with conditional standard errors, for the sparse distributions the cluster and the probability of 0), strengths, slab, logLik() (so AIC() and BIC()), residuals() of type IRES, IWRES, CWRES, PRES or PWRES, predict(type = ), confint(method = "profile"), anova(), simulate(), summary(), coef(), vcov(), plot(), plotResiduals(), plotTrace(), plotCombined() (data, IPRED and PRED per condition) and the new generic plotRandomEffects(), which compares draws from the conditional distributions of the random effects with their estimated normal, so the shrinkage of the modes does not distort it (type = "modes" for the modes).

  • New normT(): the Student-t likelihood with fixed degrees of freedom, with exact derivatives and censored data by M3, through trust() and every method of em().

  • em() and msem() take sparse = "auto" (default), TRUE or FALSE, as trust() does.

  • em() by FOCEI over normal random effects runs the outer trust region on the sparse Hessian where sparse chooses it: the joint Gauss-Newton Hessian minus the Schur complement of every group plus the volume term, each local to the parameters of the group, for one grouping and for several. summary() and the standard errors of Omega solve the sparse Hessian for the columns they need.

  • The normal prior of em() returns a sparse Hessian on hessian = "sparse".

  • FOCEI, with normal and with sparse random effects, gets the second derivatives of the volume term by forward over reverse (control$derivMode = "forward-reverse", the default, for models built with derivMode = c("forward", "reverse", "forward-reverse")): one pass forward along the random effects and a few backward sweeps give the exact gradient, the mode shift and the derivatives of the curvature of every group, at a cost that does not grow with the square of the parameters. The outer trust region takes the Gauss-Newton Schur complement with the volume curvature of the variance parameters from these derivatives; the reported Hessian is exact forward over forward where the model has deriv2, else the exact Schur complement of the joint Hessian with that volume curvature, exact for models linear in the random effects, and summary() says so. "forward-forward" keeps the second-order sensitivities; a model with only one of the two takes it. In both modes, dense and sparse, the outer model of FOCEI gets an SR1 correction from the changes of the full outer gradient between the last three accepted points: it adds the curvature Gauss-Newton leaves out, negative curvature included, so fewer fits stop at saddles of the Gauss-Newton model.

  • FOCEI in both derivative modes: the inner trust region of the random effects steps on the Gauss-Newton Hessian with an SR1 correction from the accepted steps where that stays positive definite; the outer gradient has the first-order correction for the eta gradient the inner solve leaves at the modes; a rejected step shrinks the radius to a quarter of the step length where that is shorter; the fit ends on the evaluation of the last accepted point. Forward over reverse answers all second-order seeds of a step in one backward sweep.

  • em() with Laplace, spike-and-slab or Dirichlet-process random effects takes the terms of obj besides the data, such as priors and constraints; a term on a hyperparameter or a random effect is an error.

  • Sparse random effects by forward over reverse: the marginal alone needs no second-order sensitivities, so models built without deriv2 also return to expectation consistent after a fall back to mean field.

  • em() says in a message when the models of the fit give second derivatives forward over forward only and names derivMode = c("forward", "reverse", "forward-reverse"); msem() says it once.

  • Removed from the devel-EM layer: EM() and msEM() (now em() and msem()), omega(), penaltyL1(), emInit(), updateOmegaChol(), makeSubjectNodes(), emObjfn(), sparsify(), scanL1(), gateL1(), selectEB() and the vignette “Structure selection with an estimated penalty”.

  • New alignmentModel() and align(): alignment of replicate readings with free expressions for the prediction and the standard deviation. Every symbol is a linear predictor given by a formula in model.matrix() coding with random terms, a column with one level per value, numeric or not, and I(dose) a covariate. trafo = c("sj <- 10^sj") sets the scale of a symbol, error = NULL an error model without symbols, prior a constraintL2() on any parameter, the spread of a random term included; censored readings by M3, a Student-t option. As in blotIt, the experiments connected by shared values form blocks, and per block the mean of the predictors of the first biological symbol is held at 0. Absolute readings, marked in a logical column absolute, such as concentrations by targeted mass spectrometry, are predicted by the expression absolute in the biological symbols and data columns (the first biological symbol by default, units by the expression), depend on no scaling parameter and may be NA in the columns of the scaling formulas; their block is not normalized but comes out in their units. Every experiment within a connected component of the groups of the random terms is a separate condition, so the Hessian is sparse over them; designs and coefficients are sparse matrices and the standard errors of the values come from a sparse solve. align() starts the coefficients of the first scaling symbol where the predictor of that symbol is, per experiment, the median of the predictors at which the prediction meets the relative readings, runs the fits of a multistart in parallel on cores, one core each, and stops at tolerances of sqrt(.Machine$double.eps), inner fits included. Methods print(), as.datalist(), plotValues() (the starts by rank), plotResiduals(), anova() and simulate(), plots plotAligned() and plotScaled(). The demo “alignment” aligns qPCR experiments with undetected wells, and Western blots with a random background per gel together with targeted mass spectrometry, which puts the values in nM.

  • alignmentModel() takes random terms of several groupings, nested or crossed, such as a lane effect per gel and lane shared by the antibodies of a gel beside a background per gel and antibody. They are normal and integrated per connected component; a condition is an experiment within a component, and the normalization blocks follow the fixed parts of the scaling formulas. fit$omega and fit$random have a column grouping, and plotRandomEffects() draws a panel per grouping and random effect.

  • The objective of an alignment answers all conditions by one prediction and one error-model function: the compiled model is evaluated once at the readings of all conditions, and the derivatives of every condition in the parameters of that condition and the contractions of the backward sweep run in C++, in parallel over the conditions. The error model of an alignment is taken from the prediction, which evaluates it alongside. The backward sweeps of the alignment objective answer several second-order seeds at once, so FOCEI fits it by forward over reverse.

  • An alignment holds the evaluation that the backward sweeps of prediction and error model share only within one sweep, so a fitted alignment keeps none of it; an error model that depends on no symbol is not evaluated backwards.

  • The reverse mode: the Hessian of normL2() with sweep = "reverse" has the curvature of an estimated error model, an error model that is a sum of per-condition ones goes backwards, and so does an observation function that has no parameters at second order. Y(), P() and Xs() answer several second-order seeds in one backward sweep.

  • A prediction or observation function whose kernel has a condition argument gets the condition of every call, the batch entries get conditions; an observation function answers the backward sweep through the batch entry where it has one. normL2() with times as a list evaluates a function of several conditions at the times of each, and the backward sweep sums the cotangents of the conditions in one pass. An error model whose output the prediction holds is taken from there.

  • A cppDE model keeps the batch handles of the last eight request sets.

  • A sum of objectives holds the terms, not the frame it is built in.

  • distributedComputing(build = "compile") builds a model of eight or more C++ sources that lie outside the working directory, such as in getOption("dMod2.outdir").

dMod2 0.13.4

  • evalConditionResidual() has the parameters that enter only the error model in the gradient and Hessian.

  • An objective called with hessian = "sparse" returns the Gauss-Newton Hessian as a sparse Matrix assembled from the blocks of the conditions; trust(sparse = TRUE) factorizes it by sparse Cholesky and vcov(which = ) solves it for the columns named. datapointL2() returns a sparse Hessian there too.

  • trust() and profile() take sparse = "auto" (default), TRUE or FALSE. "auto" takes the sparse Gauss-Newton Hessian for a minimization without phases, bounds or exact Hessian when there are at least 500 free parameters and the Hessian at the start fills at most 5% of the matrix (options(dMod2.sparseAuto = )), and starts from that evaluation. trust(sparse = TRUE) on an objective that returns a dense Hessian is an error that names the terms of the sum that do. mstrust() passes sparse to trust().

  • profile() on a sparse Hessian decides by the pivots of the LU factorization whether the path equation is singular, by the rule of vcov(): a pivot at most 1e-14 times the largest. A singular step then takes the pseudo-inverse and reoptimizes as on a dense Hessian, up to 5000 parameters; above, the error names the non-identifiable parameters. The pseudo-inverse step keeps all components. algoControl$W = "identity" moves the profiled parameter alone and reoptimizes the others at every step, without a matrix in the path equation and without a warning on singularity.

  • Requires cppDE 0.13.4, which takes the second derivatives of the inputs of a second-order solve as zero where none are given.

dMod2 0.13.3

  • distributedComputing() keeps the manifest of a job also in the job folder on every remote node. recover = TRUE with on given takes it from there, so a job submitted from another machine is recovered, and a job of the same name that still runs on the nodes is an error also when it was submitted from another machine.

  • distributedComputing() runs on Windows, with the local commands in the sh of Rtools. detectFreeCores() measures the processor load of the local Windows machine, without a warning.

  • compile() compiles in parallel on Windows too, with or without a combined output, and P() and Y() pass their cores to it there.

dMod2 0.13.2

  • distributedComputing() reports the start of a job as a message, on a SLURM cluster with the job ID and the array tasks. A build writes the build output to build.log in the job folder, and a failed build is an error that shows the end of that log instead of starting the tasks.

  • plotProfile() leaves more space between the panels, and a narrow panel leaves out the x labels that would overlap.

dMod2 0.13.1

  • Breaking: distributedComputing() takes where the tasks run as on: localNode(), sshNodes() or slurmCluster(), each with the cores of a task. A node is one worker, and a SLURM job has array workers, the array tasks; the tasks are dealt to the workers in turn. slurmCluster() takes walltime, memPerCore, the job script and partition, account, maxRunning and further options of sbatch. build = c("auto", "compile", "link", "copy") replaces compile and link, and "auto" compiles on remote nodes. The arguments machine, slurm, jobscript, memPerCore, walltime, compile and link are gone, and slurmTemplate() names the first argument login.

  • distributedComputing() ships the model files of the objects in input instead of every file of dMod2.outdir. A job of the same name that still runs where the new one would run is an error. The manifest is written before the start, and every job is registered until purge(local = TRUE); dMod2Jobs() lists them, and recover finds a job from any working directory. The job has wait() and log(i), and get() joins parlists with c() and data frames with rbind(), leaving out tasks without a result with a warning.

  • rbind() of parameter frames keeps their attributes and joins the parts of a profile, such as the two sides, into one. confint() sorts the right side of a profile as it does the left.

  • Breaking: trust() takes boundary as an argument instead of stepControl$boundary. trustL1() takes the settings as trust() does: ftol, mtol, gtol, xtol and rmin in tolControl, thetaMax (was theta.max) in stepControl, and parupper, parlower and boundary after iterlim; a flat name is refused with the list it moved to, and iterlim defaults to 1000.

  • The check() of a distributedComputing() job counts a task whose process remains as a zombie as finished, as in a container whose init does not reap.

  • distributedComputing(slurm = TRUE) reads the job ID of sbatch also when the build on the login node prints before it.

  • plotCombined(aesthetics = ) replaces a default aesthetic also under the other spelling, such as colour for color.

  • wide2long() of a matrix builds the data frame without a row-name warning.

dMod2 0.13.0

  • Breaking: steadyStates() has one solver, the former version "1.4": every unknown is solved from a combination of balances, so every result is a ratio of positive sums. The versions "1.0" to "1.3" and the arguments version, sparsifyLevel, outputFormat, positive and branches are gone; testSteady is "fast" or "skip".

  • Breaking: the options are named dMod2.*: dMod2.cores, dMod2.outdir, dMod2.batch.check and dMod2.compile.cmdlimit; the dMod.* names are no longer read. dMod.quiet and dMod.sym.<name> are gone: suppressPackageStartupMessages() silences the startup message, and SYMIDENT_<NAME> sets a switch of symident. ?dMod2 lists the options and environment variables.

  • The solver options of Xs() and Xf() on the cppDE and Sundials backends take maxOrder, an upper bound on the order of the multistep methods, and stald, stability limit detection for "bdf".

  • Breaking: distributedComputing() is rebuilt and takes over runbg(); runbg() and profileParsPerNode() are removed. The code runs once per task: tasks is a number, a list or a data frame, and the code reads the element or row as task and the position as taskId, and the cores it may use as cores. Without slurm the tasks run as detached background processes on "localhost", without ssh, or on machines reached by ssh, one after the other per machine and each with the machine’s cores: those machine names, as in c(server1 = 20, server2 = 10), or the free cores of the machine, and never more than are free. With slurm = TRUE they form an array job with the cores machine names, submitted through the job script template of the login node, with {{ }} fields. input is taken from the calling environment, every task gets the seed seed + taskId, recover needs only the jobname, and the job gains terminate(); check() returns TRUE once no task runs any more and warns about failed tasks. cores, nRep, varValues, partition, nodes, sshPasswd, customFolders, returnAll, resetSeeds and purgeLocal are gone. demo("BA_transport") sends the multistarts this way, and examples/distributedComputing.md describes it.

  • slurmTemplate() sets up the job script template of a SLURM cluster once per login node, kept across sessions, from a job script of the cluster or from the one dMod2 ships for the bwForCluster Helix.

  • mstrust() draws every random start, those of retries included, before it spreads the fits over cores, so set.seed() reproduces a run whatever cores.

  • unique() on a parframe returns the rows with distinct values sorted by value, also for a parframe not sorted by value; rows are selected with subset() first. dMod2 needs ggplot2 3.5.0.

  • rref() no longer takes verbose, which it did not use.

  • detectFreeCores() names the values by machine and reaches "localhost" without ssh.

  • symmetryDetection(unknownInputs = ) declares unknown functions of time; an exact direction lists the change of each input as inputChange. Needs symident 0.12.0.

  • Loading dMod2 no longer requires symident in the Python environment; symmetryDetection() and symmetryReduction() require it on first use, so a symident that cannot be resolved leaves the code generation of models intact.

  • Breaking: getElements(), blockdiagSymb(), getLinVars(), long2wide(), lsdMod(), compare(), forcingsSymb() and dot() are removed, as is the character method of reduceReplicates(); reduceReplicates(read.csv(file)) replaces it, and openxlsx and purrr are no longer suggested. progressBar() is no longer exported.

  • Breaking: a dMod function refuses a named argument it does not take, more unnamed arguments than it has inputs and a missing input, so x(times, pars, condition = "C1") is an error instead of a prediction for all conditions. Xs() and Xf() refuse arguments they do not take.

  • Breaking: the subset expressions of plotPars(), plotValues() and plotArray() come right after the data, tol, direction, covtable and nSim after them; covtable defaults to NULL, and the subset applies with and without it. plotArray() draws nSim trajectories evenly spaced from the optimum, at most one per profile point, grouped by parameter set.

  • Xd() applies the chain rule of a parameter transformation and differentiates by the free parameters only; a missing grid parameter is an error.

  • predict() on a parframe labels each prediction with the row it comes from, also for a parframe not sorted by value, and adds a condition grid with one covariate; plotResiduals() uses the row of each fit.

  • addReaction() reads any numeric coefficient, such as 3/2*A, (2)*A or 2*3*A, and refuses a term that is no coefficient*species, a reaction without species and a state named Rate or Description. getReactions() writes the coefficients as they are. subset() of an eqnlist takes %in% on a vector as base R does.

  • rref() sets entries below tol to zero and returns the pivots as an integer vector; nullZ() passes tol on and returns the identity for a matrix without pivots. Conserved quantities have no rounding residues.

  • lloq = NA in data means no limit of quantification.

  • as.datalist() takes data without a condition or covariate column, as one condition "1", tibbles and data.tables. Renaming a datalist renames the condition column, subset() of a datalist keeps the condition grid, and covariates() of a data frame returns a data frame for any number of covariates.

  • reduceReplicates() names conditions by the levels of factor columns.

  • profile() checks whichPar, stepControl and algoControl, names a failed profile with the error, reports an objective error that ended a side and singular Hessians once per profile, and returns the optimum alone when no step is accepted. Each path step solves the linear system directly and takes the pseudoinverse only for an ill-conditioned one.

  • confint() takes a profile without a data column through val.column = "value".

  • mstrust() takes an anonymous samplefun or one with a long name, passes the arguments of an optimizer other than trust(), refuses fits < 1, and writes one log entry per fit also from PSOCK workers; load.parlist() reads the fits in the order of their numbers. mstrust() and profile() share one parallel backend.

  • A scaled objective a %.*% obj keeps an absent gradient or Hessian absent and needs a finite scalar a.

  • On the deSolve backend, Xs() and Xf() return the requested times only, warn when the solver stops early, name missing parameters, and Xs() checks names and refuses an odemodel without sensitivities.

  • [ on a parframe keeps a single column as a parframe and selects columns by a single index, as for a data frame; as.parvec() of a parframe checks index; parframe() takes as parameters the columns that are neither meta names nor objective attributes. summary() and plot() of a parlist skip aborted fits, summary() also takes an empty parlist and fits without convergence flag, and c() of parlists concatenates.

  • eqnvec(), parvec() and prdlist() name unnamed entries by their position; a parvec with NA prints; wide2long() refuses duplicated names.

  • plotPaths() and plotPathsMulti() build their paths in one pass; plotPathsMulti() normalizes each path to the range -1 to 1 and colors the nPars largest paths, the others in “Others”. plotPars() detects steps on a frame in any order and names the column step. A layer added to plotCombined() uses the data of the layer. coordTransform() propagates errors only where sigma is given. plotFluxes() takes any number of fluxes.

  • wide2long(), lbind() and combine() bind through data.table, also the data frames of predictions with many conditions.

  • write.eqnlist() and as.eventlist() handle empty lists; is.eqnlist() checks that the columns of the stoichiometric matrix are the states.

  • Pexpl() marks an output as fixed only when it depends on no varying input, and Pimpl() keeps the rows of every solved state, so an output whose first derivative vanishes at the evaluation point keeps the second derivative. Pimpl() treats a species that no reaction changes, such as a catalyst, as a constant state, not as zero.

  • In a sum of objectives, datapointL2() finds the predictions of every normL2() term, also behind a prior or a term that conditions skips. obj + NULL returns obj; adding anything else that is not an objfn is an error.

  • constraintL2() and the other priors apply a named sigma to the parameter it names and refuse a sigma without an entry for a parameter of mu. trustL1(minimize = FALSE) subtracts the penalty from the objective it maximizes. evalConditionResidual() passes fixed parameters to the error model also without sensitivities.

  • odemodel(deriv = FALSE) builds no derivatives, whatever derivMode. define() and insert() refuse conditionMatch for a trafo without a condition tree.

  • eqnlist() takes compartments without compartmentOf, with every state in defaultComp, and refuses compartmentOf without the compartments. c() of eqnlists keeps the layout of an eqnlist without reactions and the custom totals, and subset() returns an empty eqnlist when no reaction matches. log10Transform() keeps names that sympy reads as constants, such as E and I. format.eqnvec() keeps powers and numbers such as 1e-3 whole. as.eqnvec() refuses empty and duplicated names.

  • lbind() and as.data.frame() of a datalist fill a column that some conditions lack with NA. c() of datalists returns class list as well and refuses a condition named twice. as.datalist() refuses covariate values whose condition names coincide.

  • subset() of a parframe and the subsets of plotPars(), plotValues() and plotProfile() take several expressions and see the frame of the caller. as.parframe() of a parlist fills a parameter that some fits lack with NA, and c() appends a single fit to a parlist. plotProfile(parlist = ) draws the profiled parameters only, plotProfilesAndPaths() draws the total profile, plot() of a prdframe takes a data frame, and coordTransform() keeps the order of the rows.

  • modelname<- assigns a vector of names condition by condition and takes conditions; getParameters(conditions = ) of a function for every condition returns the parameters of that condition.

  • The code that dMod 1 contributors other than the authors wrote is reimplemented from the documented behavior: the print methods of eqnvec, eqnlist, objlist and parvec, summary(), plot() and as.parframe() of a parlist, fitErrorModel(), reduceReplicates(), the argument routing and fit log of mstrust(), Xd(), define(), insert(), conservedQuantities(), the datalist methods and the prediction, data, flux, residual and array plots. With the old steadyStates() versions gone, DESCRIPTION lists the two authors only.

  • Xd() takes a state with a single grid point as constant; plotFluxes() labels an unnamed flux by the flux expression also when others are named; eqnlist() takes a plain vector as a one-column stoichiometric matrix; reduceReplicates() groups by the exact times instead of times rounded to seven digits.

  • In a nested sum of objectives, a term without conditions is evaluated for any requested conditions, as in a flat sum.

  • summary() of a parlist heads the table “Best and worst fit”; the messages of as.parvec() on an unconverged fit, as.eqnvec() on unparsable equations and steadyStates() on named givenCQs are reworded.

dMod2 0.12.7

  • loadDLL() also loads the shared objects of a model’s auxiliary sources, such as the influx function of Pimpl(), so mstrust() and profile() with a condition axis run on PSOCK workers also for models compiled source by source.
  • trust() and trustL1() append the objective’s error message to parinit not feasible: objfun failed.
  • define(), insert() and repar() on trafo = NULL map each left-hand side to the right-hand side, not to itself.

dMod2 0.12.6

  • controls() on an objective also reaches the functions it evaluates: the prediction and error model of each normL2() term and the parameter transformation of an objfn * parfn. Solver tolerances and other controls can be changed through the objective alone. condition restricts the lookup as for an fn.
  • An unknown entry of options, optionsSens or optionsReverse of Xs() and Xf() is an error, also when set later with controls().
  • Y() names a state the prediction does not return, e.g. after the control names of Xs() left it out.
  • A failed batch solve names the conditions that did not complete.
  • plotValues() shows unconverged fits in red with a legend entry of their own instead of a caption.

dMod2 0.12.5

  • plotValues() colors converged fits by their iterations on the dMod ramp and draws unconverged ones in red, with a caption only when there are any. With pseudoLog = TRUE, a range within one decade gets breaks at 1-2-5 or finer.
  • The demo KokMSB2020 shows the model scheme of the publication and the statistics of 200 fits, which ship in inst/extdata/kok/.

dMod2 0.12.4

  • symmetryDetection() and symmetryReduction() need symident 0.11.0. A direction checked without an error bound has level "checked", and info$assumptions lists the declared domain and the declared starts of the switches, with the error bound.
  • symmetryReduction() names the claims of a section that are not proven under blocks[[i]]$unproven, with level "open", and lists assumptions; the level "assumed", blocks[[i]]$assumptions and the argument verbose are removed. A section on a face holds faceWhy and faceLevel; a resting state checked only at random points of the face makes the block "checked".
  • In the blocks of symmetryReduction(), newParameters, solvedDomain and choices replace survivorMeaning, carrierDomain and admissible.
  • trust() takes phases, a list of phases, each with a separate hessianMethod, iterlim, sweep and qnControl, run in turn and cycled through for up to switches handovers. A phase that uses up the iterlim of the phase hands over like a soft stop. fallbackControl is removed: fallbackControl = list(hessianMethod = "sr1", limit = 3, iterlim = 200) is phases = list(list(hessianMethod = "gn"), list(hessianMethod = "sr1", iterlim = 200)), switches = 3. A run without phases is unchanged.
  • The result of trust() has phaseIterations, the iterations of each phase run in run order, and with phases the sweeps of the phases as phaseSweep in place of fallbackSweep. as.parframe() adds a column iterations.<phase> per phase.
  • Each run of a quasi-Newton phase has a separate allowance of reseeds by qnControl$hessianReseed = "stall"; nReseed counts over the run.
  • mstrust(cores = c(fits = , conditions = )) runs both axes as given, each capped at the cores available, and records that layout in attr(, "run")$cores.
  • mstrust() and profile() stop the cluster of a conditions axis and restore options(dMod.cores) on exit, on every platform.
  • The cores available are those of the R process, parallelly::availableCores(), which follows the CPU affinity and a SLURM or PBS allocation. dMod2 imports parallelly.
  • A sum of objective functions keeps the compileInfo of the terms, so loadDLL() on it searches the directories the sources of the terms were compiled in.

dMod2 0.12.3

  • trustL1() drops parscale, as trust() did in 0.12.2. A scaling of the parameters belongs in P().

dMod2 0.12.2

  • trust() gains fallbackControl, the settings of the fallback phase: hessianMethod (default "none"), limit, iterlim (per fallback phase), sweep and qnControl. With sweep = NULL, the default, the fallback phase evaluates the objective backwards when the chain can. hessianFallback, fallbackLimit and parscale are removed.
  • trust() defaults to iterlim = 1000, counted over all phases.
  • The deprecated argument names and aliases are removed, among them attr.name, opt.BLOQ, obj.attributes, sort.by, split.by, keep.covariates, rank.tol, attach.input, keep.root, optionsOde, start1stfromCenter, fterm, mterm, stepControl$theta.max, the controlsPTC entries rtol and atol, the cores of normL2() and readPetabYaml(), readPetabTables(). repar(expr, trafo) is an error.
  • mstrust() drops hessian from every fit and records elapsed, the wall time of each fit, and the attribute "run" with the start time, total wall time, cores, optimizer, sampler, their arguments and the package versions. as.parframe() adds the column elapsed and keeps "run".
  • vcov() takes an evaluation of an objective function, vcov(obj(pars)), with fixed for parameters held at a bound. vcov() on a fit without Hessian is an error instead of a matrix of NA.
  • The .R files of mstrust(cautiousMode = TRUE) restore the fits exactly.

dMod2 0.12.1

  • Needs symident 0.10.1.
  • When symident needs msolve and finds none, symmetryDetection() and symmetryReduction() ask in an interactive session whether to build it into the symident cache, on Windows with Rtools, and then repeat the call.

dMod2 0.12.0

  • Needs cppDE 0.13.0 and symident 0.10.0.
  • getSymbols() and replaceSymbols() are dMod2’s own, no longer re-exported from cOde, which is needed for the deSolve backend only. replaceSymbols() brackets a replacement that is not a single operand, replaces variables only, not function or argument names, and keeps the spacing.
  • pi is the number in equations, as in cppDE, and getSymbols() does not list it.
  • symmetryDetection() gains regimes, the regimes an experiment visits in a model with switches, overall or per condition.
  • A direction of symmetryDetection() has a level ("exact", "verified" or "open") in place of certified, and stateComponents. info gains rankStatus, proof, bound, gapCertified, limits, errors and branches.
  • reconstControl() gains homotopyDegree, degreeCapMax, exactProof, exactWorkCap and seed; NULL, the default, keeps the value of symident.
  • symmetryReduction() stops at a direction of level "open" unless allowOpen = TRUE. It gains workCap, timeout defaults to Inf, and check = TRUE runs the detection again on the reduced model. The result gains level, limits and checks, and each block a level.
  • plotValues() draws the objective values on a linear scale, not their distance to the best fit on a pseudo-log scale; pseudoLog = TRUE switches to a pseudo-log10 scale.
  • The data set kok and the demo KokMSB2020. The Bachmann, Boehm, bile acid and Hodgkin-Huxley scripts are demos as well, demo(package = "dMod2") lists them; the tutorials left in inst/examples from dMod and the R2C templates in inst/templates are removed, and the gradient comparisons moved to bench/gradient.
  • bench/ and benchmarks/ are one directory, bench/, by topic: harness/ (the PEtab benchmark suite), gradient/, hessian/, symmetry/, multipleShooting/ and numSteady/.

dMod2 0.11.4

  • symident and python-libsbml are found in ~/.virtualenvs/r-reticulate too, installed on first use.
  • summary(x, detailed = TRUE) on a symmetryReduction() result explains each section. Needs symident 0.9.3.

dMod2 0.11.3

  • New trustL1(): the trust region of trust() with an L1 penalty on chosen parameters around reference values mu, one-sided with one.sided. gate keeps a parameter on or above the kink of the penalty, so it can reach the reference exactly, and fuse penalizes the pairwise differences within blocks, whose members move as one while equal. The penalized step runs in a C++ kernel.

dMod2 0.11.2

dMod2 0.11.1

  • distributedComputing() runs zstd as a separate pipe stage and moves the uploaded files one by one, so the upload and the collection of results run on macOS.

dMod2 0.11.0

  • Breaking: Xs() on cppDE takes refine and gradtol in optionsReverse; floor is gone, and so is the weighting of the backward grid by the previous evaluation’s adjoint. refine = TRUE holds each step of the backward sweep to the error test of the CVODES backward problem under abstol and reltol, through cppDE::adjointControl(refine = TRUE), and gradtol is then the absolute tolerance on each step’s share of the gradient. The reverse value pass takes the grid of a value solve.
  • New symmetryDetection(), reconstControl() and symmetryReduction(): structural non-identifiabilities of an ODE model, as generators of the symmetries of the model, and the parameter transformation that removes them. The computation runs in the Python package symident through reticulate, which installs it on first use from https://github.com/dModverse/symident; R arguments and fields are camelCase, print() and summary() are the reports of symident. symident’s switches are read from SYMIDENT_* and from the options dMod.sym.*. msolve, for coupled steady states, comes from symident.install_msolve() or SYMIDENT_MSOLVE.
  • reticulate no longer provisions symengine.
  • Xs() on cppDE and Sundials stops on a failed solve (onFailure = "stop"), as Xf() does; a fit takes the error as a rejected step.
  • Xs() on cppDE: optionsSens = list(sensErrCon = FALSE) takes the sensitivities out of the error test.
  • odemodel(backend = "Sundials", derivMode = "reverse") takes events: the reverse objective takes the adjoint and the gradient through each jump.
  • Reverse objectives run their solves through prepared batch handles, evaluate the error model batched and keep the data-to-prediction indices between evaluations. Under second order a transformation that no tangent reaches skips the second derivatives of that transformation.
  • normL2() with one condition evaluates the error model without derivatives when none are requested.
  • importPEtab() gains sparse, which pins the sparse (KLU) or dense linear solver of the cppDE and Sundials backends.
  • benchmarks/, outside the built package: value, forward and reverse gradients of PEtab benchmark problems by tier (run-benchmarks.R --tier tiny|medium|full), with the scripts of inst/benchmarks/ under benchmarks/scripts/.
  • A sum of objectives keeps the sweep attribute the terms agree on, so a reverse objective with a prior says it was evaluated in reverse.
  • constraintL1() and constraintL2() are S3 generics; the default methods are the priors on named parameters.
  • The option dMod.outdir sets where odemodel(), P(), Pimpl(), Y() and the PEtab import write generated sources and shared objects; unset, it is the working directory.
  • getSymbols() and replaceSymbols() are reexported from cOde.
  • Breaking: Xs() takes the solver options as options, which applies to every solve, and optionsSens, which holds only the entries that override options for the solves with sensitivities. Xf() and importPEtab() take options as well, and the controls are named options, optionsSens and optionsReverse. optionsOde is still accepted as an argument and by controls(), with a deprecation warning. On deSolve the default methods stay "lsoda" and, for the solves with sensitivities, "lsodes".
  • Xs() on cppDE warns about an unknown entry of optionsReverse, given to the constructor or set through controls().
  • The solver option for the limit of consecutive rejected steps is maxattempts, as in cppDE.
  • Fix: constraintL2() * P() takes fixed, and with it trust(fixed = ) and profile() on such priors.
  • Fix: Xt() returns the sensitivities by the outer parameters, so g * Xt() * p has derivatives and normL2() on it takes fixed.
  • Fix: Y() differentiates by the observation and error parameters also when no transformation precedes the prediction, those that are not parameters of x included.
  • Fix: normL2() takes an error model whose parameters are all fixed.
  • Fix: as.datalist() stores a sigma or lloq column of NA alone as numeric.
  • Fix: mstrust(cautiousMode = TRUE) removes the .Rda fits of the same run only, not files of that name in the working directory.
  • Breaking: arguments in dot case are camelCase. Y() and Pexpl() take attachInput (was attach.input), Pimpl() keepRoot (was keep.root); both are also the names of the controls.
  • Breaking: normL2(), datapointL2() and the constraint*() priors take attrName (was attr.name), also as control of datapointL2(); normL2() and evalConditionResidual() take optBLOQ (was opt.BLOQ).
  • Breaking: datapointL2() takes parameter (was value), the name of the parameter holding the data value.
  • Breaking: as.datalist() takes splitBy and keepCovariates (were split.by and keep.covariates), as.parframe() sortBy (was sort.by), parframe() objAttributes (was obj.attributes; the attribute name stays the same).
  • Breaking: reml() and remlLeverage() take rankTol (was rank.tol).
  • Breaking: trust(stepControl = ) takes thetaMax (was theta.max); mstrust() takes startFromCenter (was start1stfromCenter).
  • Breaking: distributedComputing() takes memPerCore, sshPasswd, varValues, nRep, purgeLocal and customFolders (were mem_per_core, ssh_passwd, var_values, no_rep, purge_local and custom_folders); the purge() of the job takes purgeLocal.
  • Breaking: plotPathsMulti() and plotProfilesAndPaths() take whichPar and nPars (were whichpars and npars), plotProfilesAndPaths() ncol (was ncols), plotArray() nSim (was nsimus), plotFluxes() legendTitle (was nameFlux), attrs() which (was atr) and profileParsPerNode() parsPerNode (was fits_per_node).
  • Breaking: reconstControl() takes minSupportCandCap, perPrimeCap and perPrimeMinPrimes (were minsupportCandCap, perprimeCap and perprimeMinPrimes).
  • Breaking: readPEtabYaml() and readPEtabTables() replace readPetabYaml() and readPetabTables(). An imported problem prints as <PEtab problem ...>.
  • Breaking: repar(trafo, expr) takes the transformation first, as define() and insert() do. The order repar(expr, trafo) is recognized by an expression in first place.
  • Breaking: profile() and vcov() are methods of the generics of stats, which dMod2 no longer masks. profile() dispatches on objective functions and plain R functions, first argument fitted (was objfun). trust() returns a list of class trustfit, kept by mstrust(), on which vcov() dispatches, first argument object (was fit); a fit stored before needs class(fit) <- c("trustfit", "list").
  • Breaking: the operands of + and * on dMod functions, objectives, objlists and datalists are named e1 and e2.
  • The old names above are accepted with a deprecation warning; giving the old and the new name together is an error.
  • Breaking: distributedComputing() submits by default (recover = FALSE). The get() of distributedComputing() and runbg() returns the results instead of assigning cluster_result or .runbgOutput in the global environment; runbg(wait = TRUE) returns them too. The former behavior is cluster_result <- job$get().
  • Breaking: steadyStates() writes nothing unless file is given; the model for the solver goes to a temporary file. The unused argument rates is deprecated and ignored, and verbose defaults to FALSE.
  • Breaking: fitErrorModel() plots only with plotting = TRUE; resetWarmStarts() and symmetryDetection() print only with verbose = TRUE.
  • Breaking: symmetryDetection() requires f and g.
  • ggopen() opens the PDF with the viewer of the platform by default: open on macOS, xdg-open on Linux, shell.exec() on Windows.
  • trust(parscale = ) is deprecated and warns; it still scales the trust region. Fit on log scale instead.
  • msParframe() leaves the global random number generator as it was. mstrust() takes samplefun as a function as well as the name of one.
  • rref() returns a list named rref and pivots; the unused argument fractions is deprecated and ignored.
  • Breaking: Pimpl(controlsPTC) takes the tolerances as reltol and abstol, as cppDE::ptc() does; rtol and atol are deprecated.
  • compile() restores PKG_* flags set before the call without an error, and leaves no symbols.rds in the working directory under R CMD check.
  • reconstControl(homotopy = ) switches the last reconstruction route of symident, which fits directions still open under equilibrate = TRUE along lines in parameter space; on by default.
  • Needs cppDE 0.12.0.

dMod2 0.10.3

  • The help pages of the constructors (odemodel(), Xs(), Xf(), Xd(), Xt(), Y(), P(), Pexpl(), Pimpl(), normL2(), datapointL2(), the constraint*() priors) and of the function classes are rewritten, with examples for Xs(), P(), Pexpl() and Pimpl().
  • Xs() and Xf() on cppDE and Sundials return the forcings after the states, so observables can contain them, and take forcing names as factor. A forcing holds the first and last value outside the points and may be a single point.
  • Xf() on cppDE and Sundials starts states missing from pars at 0.
  • datapointL2() returns an objlist.
  • constraintL2() stops on a sigma that mixes numbers and parameter names.
  • normL2() names the data conditions x does not have.
  • plotValues() puts the breaks at 0 and at the decades from 10 on and leaves the limits of the y axis free.
  • Needs cppDE 0.11.3.

dMod2 0.10.2

  • runbg() and distributedComputing() with compile = TRUE take SUNDIALS’ include path, and MPI’s if that SUNDIALS was built with it, from the cppDE installed on the remote machine instead of the submitting one. A model using SUNDIALS’ LAPACK dense solver links it there too, and the build stops with a message if the remote SUNDIALS lacks it.

dMod2 0.10.1

  • Pimpl() draws the random starts uniformly over startRange = c(-5, 5) on startScale, log10 by default and linear if positive = FALSE. Each warm-start cache, i.e. each condition in each fit of mstrust(), draws from a separate stream; the global RNG is read, not advanced. maxit defaults to ceiling(70 * log(n + 1)) for n states (was 400).
  • Needs cppDE 0.11.2: ptc() scales a row by the largest partial derivative in that row and builds on macOS.

dMod2 0.10.0

  • normL2() loses t0. times is a vector for all conditions or a list named by condition, and the prediction of a condition starts at the first time of the grid, the data times and the times of that condition: times = list(C1 = -10, C2 = 5) is what t0 = c(C1 = -10, C2 = 5) was. Without times the grid starts at the first data point, which matters only for a model built with odemodel(..., includeTimeZero = FALSE); with the default the grid holds 0. PEtab start times go through times, in one objective for all conditions.
  • Multiple shooting. normL2(data, g * x * p, multipleShootingControl = TRUE), or a list of settings, makes trust() and mstrust() fit by Bock’s generalized Gauss-Newton method. The time axis is cut into segments with node values of their own; continuity is a constraint, linearized and eliminated at every iterate (condensing), so the subproblem keeps the single-shooting size and box bounds apply unchanged. At convergence the result is a stationary point of the single-shooting objective, which the objective still is when called as a function. The ODE model needs odemodel(..., includeTimeZero = FALSE); profile() re-optimizes by single shooting.
  • The trust region bounds parameters and node values together. Steps are accepted by a filter or an l2 merit function (stepControl$acceptance), with a second-order correction (stepControl$soc) and a gap tolerance (tolControl$ctol).
  • stepControl$anneal (default) first penalizes the gaps, f + w ||c||^2 with w rising tenfold per stage, then hands over to the exact method. A stage ends once a step gains less than a thousandth; the annealing ends early where the penalty dominates and a stage no longer closes the gaps.
  • nodes = "auto" (default) starts from ten segments per condition, or one per half oscillation of the data where that is more, and cuts a segment where the propagation matrix of the segment grows by more than growth, where the segment misses the data by more than misfit and by twice the median of the condition, or where the solve of the segment fails. A misfit everywhere is left to the parameters, and each half of a cut keeps minPoints data points, by default one more than the states. Unobserved node values start from a run synchronized to the data. charts puts node values on a log10, linear or angle scale per state; the gap of an angle is taken modulo 2 pi. The scale of an unobserved linear state is the largest range it covers within one segment. hessianMethod = "bfgs" or "sr1" keeps one quasi-Newton block per segment.
  • The cost of an evaluation is linear in the number of segments: segment parameters are built per condition, the annealing model is assembled in one pass, and the values at new nodes come from one batched solve. fit$multipleShooting$cuts counts the cuts by growth, misfit and failed solve.
  • c() of one parameter vector, alone or beside NULL or an empty one, as every prediction builds the parameters, skips the list machinery.
  • Methods of the Freiburg group (Bock; Horbelt, Timmer and Voss 2002; Peifer and Timmer 2007; Voss, Timmer and Kurths 2004), off by default: stepControl$acceptance = "natural" (damped Gauss-Newton on the natural level function, needs a fixed sigma), stepControl$twoPhase (parameters first, then nodes), stepControl$regularise, stepControl$restore (restoration phase of the filter), init = "spline", minPoints, nodes = "transitions" (a node just before each fast change of the data) and breaks (nodes without continuity).
  • Spiking data need tight integrator tolerances (1e-10); at 1e-8 the objective is too noisy far from the optimum and the trust region collapses.
  • The objective returns the weighted residuals of each segment and their Jacobian on request (residuals = TRUE). A trial point after a rejected step is evaluated without sensitivities.
  • The reverse walk takes several first-order seeds at once, which Xs() answers in one backward solve. Checkpoints serve any number of backward sweeps.
  • New benches bench/multipleShooting_preBotC.R and bench/multipleShooting_macrospin.R.

dMod2 0.9.2

  • Pimpl() runs a multistart when the warm starts and the initial guess fail: controlsPTC(nStarts = 20, startSd = 2, seed = 1), log-normal around the guess, from a fixed seed and without touching the global RNG. If every start fails it is an error.
  • plotValues() draws the objective values minus the best one on a pseudo-log10 scale, linear below 1; "data" holds the distance in delta.

dMod2 0.9.1

  • exportPEtab() reads the parameter scale off p: a parameter entering only as exp(X) is written with parameterScale = log, one entering only as 10^(X) or exp10(X) with log10, with linear nominal values and bounds five decades around them. parameterScale = NULL is the new default. v2 writes the linear values.
  • exportPEtab() writes no self-referencing files for a trafo like A ~ exp(A). An outer parameter named like a state goes out as init_<state> and the condition table sets the species to it; one named like an inner parameter keeps the name under a pure scale wrap and becomes <name>_outer otherwise. Symbolic initial values go to the condition table instead of SBML <initialAssignment>. An export with an assignment that would still refer to the target of that assignment stops with an error.
  • exportPEtabObject() to v1 keeps preequilibration conditions in the condition table, leaves condition targets and compartment sizes out of the parameter table, writes observables in a v2 noise formula as their formula, and refuses condition switches during a simulation, which v1 cannot hold. A v2 experiment names no condition where the table has none.
  • exportPEtabObject() to v1 moves an expression that sets a species in every condition into an SBML initial assignment and warns about per-condition expressions, which v1 does not allow; start times after 0 stop the export. Measurements name their conditions by id, as the condition table does.
  • exportPEtabObject() to v1 keeps the SBML constants of an imported problem in the SBML, as v2 does, so they keep their role in a preequilibration.
  • exportPEtabObject() declares condition targets and compartment sizes that nothing else states, with the SBML default recorded at import.
  • exportPEtabObject() writes a single measured sigma per observable as the noise formula of that observable instead of per-row noise parameters.
  • exportPEtabObject() translates priors between the versions: v1 spells the log families logNormal/logLaplace, and a v1 prior on the parameter scale goes to v2 as the matching prior of the linear parameter. importPEtab() reads the v1 spellings and truncates a prior on the parameter scale at the bounds on that scale.
  • importSbml() substitutes the initial assignment of a constant parameter wherever the parameter appears, with species at their initial values, so a condition that sets the source parameter reaches the rates.
  • repar(), insert() and define() keep a trailing underscore in an identifier.
  • Y() returns a NaN observable instead of stopping, and normL2() stops only on a NaN at a data point.
  • importPEtab(derivMode = c("forward", "reverse")) builds the observation, error model and parameter transformation for the reverse sweep as well, so obj(sweep = "reverse") runs.
  • exportSbml() declares species that enter a rate without being consumed or produced as modifiers, as SBML requires, and stops on a compartment sized by the symbol of that compartment without a value.

dMod2 0.9.0

  • Pimpl() solves steady states by pseudo-transient continuation: implicit Euler steps under local error control that turn into Newton steps near the root. It follows the flow to a stable steady state and checks the eigenvalues on the conservation manifold; flow = FALSE returns any regular root of plain equations. The iteration runs in C++, cppDE::ptc().
  • Pimpl() keeps every species and adds the conservation rows C x = T instead of eliminating pivot species. Iterates stay positive and on the manifold. States without influx at the given parameter values are 0.
  • Pimpl() starts deterministically: the nearest kept root of the condition corrected by the sensitivities of that root, then the initial guess. Conditions with identical inputs are solved once. A failed solve is an error.
  • Pimpl(): controlsPTC replaces controlsMS and controlsNleqslv, expressInTotals is gone. nleqslv is no longer a dependency.
  • Pequil() is removed. P() builds an eqnlist with Pimpl(); method = "equilibrate" is gone.
  • importPEtab() computes preequilibration with Pimpl(). Events do not act during preequilibration (PEtab v2 case 0023).
  • importPEtab(): species a preequilibration cannot move keep their initial values. They take part only in reactions idled by SBML constants at 0 or by species that start and stay at 0, and the steady-state equations leave them undetermined.

dMod2 0.8.4

  • steadyStates() 1.3 and 1.4 detect structurally zero clusters that span compartments, such as a ligand in the medium bound by a receptor in the cell. The sink-cluster test runs in amounts, over reactions rather than the rows per volume ratio the backend reads. As in 0.8.3, a conserved moiety in the support of the test stays nonzero.

dMod2 0.8.3

  • Structurally zero states: only species that drain into a leaking reaction are zero; a conserved moiety listed before a leaking cluster stays nonzero.

dMod2 0.8.2

  • steadyStates(version = "1.4") prints the resolved expressions through sympy, as 1.3 does: no redundant brackets from the substitution, nothing expanded.
  • steadyStates(version = "1.4", solveQuadratic = TRUE): a state whose own balance, denominators cleared, is quadratic with positive production and quadratic consumption takes the unique positive root, tried before any rate constant. A root that would take a balance another unknown needs is dropped for the next attempt.
  • steadyStates(version = "1.4", givenCQs = ): each conserved quantity keeps one state free, the first one whose balance can be spent elsewhere. customTotals() reach it.
  • steadyStates(version = "1.4") never solves for a rate constant whose fluxes all contain a neglected symbol, which would divide by that symbol.
  • steadyStates(version = "1.4") prints one line per attempt instead of the intermediate expressions, notes after the summary, and on failure the balances left.
  • steadyStates() handles species named like sympy objects (Ci, E, S, Q, gamma).

dMod2 0.8.1

  • steadyStates(version = "1.4"): a new core on the same interface. Balances are linear forms over the flux terms, and each unknown comes from a combination of balances a linear program finds, so every solution is a ratio of positive sums. Where no single unknown is left, one side of a balance shares the sum of that side by new flux ratios r_*. Needs positive = TRUE; volumes are never unknowns, and solveQuadratic, branches and givenCQs do not apply.
  • steadyStates(verbose = ): TRUE (default) prints a few progress lines and the result, FALSE the result only, "full" every step.
  • steadyStates() 1.3 solves linear balances directly instead of by solve(), reads signs off the expression tree after a numeric screen, and searches a block balance by balance when no pivot combination is positive.
  • steadyStates() solves a strongly connected block of states jointly where no single balance stays positive, e.g. receptors recycling through endosomes.
  • steadyStates() solves every rate constant at most once. A symbol defined twice, by itself or in a cycle is an error.
  • steadyStates() factors out common terms instead of canceling the resolved expressions.
  • steadyStates(testSteady = "fast") checks mod p only. A residual it cannot evaluate is an error that names the reason, not a fallback to the symbolic test.
  • normL2(t0 = ) takes one start per condition, named by condition.
  • Pexpl() and Y() build derivMode = "forward" by default and accept "forward-reverse", which the reverse sweep with deriv2 = TRUE needs.
  • controls() reaches every option an object uses at run time, and controls<- changes it for the next call. Pimpl() (keep.root, controlsMS, controlsNleqslv) and Pexpl() (attach.input) have controls; Pequil() reads keep.root and attach.input from them, and the memo of Pequil() answers only calls made with the same controls. Xs() and Xf() merge the solver defaults at each call, so replacing optionsOde keeps the options it does not name. The accessor walks g * x * p, the summands of a sum (attribute terms) and the objective inside %.*% and objfn * parfn; condition = NULL sets every condition, and an unknown name or condition is an error.
  • mstrust() routes the arguments by the formals of optmethod instead of those of trust(), and does not pass cautiousMode to the objective.
  • A prediction the solver cut short is an error in normL2() that names the time the solver reached, which trust() takes as a failed step. Pexpl(attach.input = TRUE) gives the inputs it passes through their forward derivatives, so the forward gradient and Hessian along them are complete; inputs in fixed are handed on as constants. The name clash check of mstrust() measures the intersection.
  • Requires cppDE 0.10.2.

dMod2 0.8.0

  • Reverse mode. obj(pars, sweep = "reverse") walks normL2 -> Y -> Xs -> P backwards in one sweep, at a cost that does not grow with the number of parameters; with deriv2 = TRUE it returns the exact Hessian at a cost linear in it. Needs odemodel(..., derivMode = c("forward", "reverse")), or "forward-reverse" for second order; backend = "Sundials" uses the CVODES adjoint, and importPEtab(backend = "Sundials") imports onto it. The reverse gradient belongs to the trajectory of the value solve and reuses the checkpoints of that solve; Xs(optionsReverse = list(gradtol = )) weights the backward step size.
  • Derivative arguments. deriv, hessian, deriv2 and sweep each ask for one thing, and curvature is gone. derivMode names the direction at build time in odemodel(), Y(), Pexpl() and importPEtab(); reverse = TRUE and "dual" are errors. "symbolic" is gone, so transformation and observation functions evaluate only after compile().
  • Optimization. trust() asks per evaluation for a value, a gradient, a Gauss-Newton or an exact Hessian. qnControl$hessianInit = "exact" seeds a quasi-Newton run, hessianReseed = "stall" fetches a fresh Hessian when it stalls, and hessianMethod = "exact" is a Newton run.
  • Requires cppDE 0.10.0 and follows the cppDE names: tangent, hessian, cotangent and curvature, and cppFUN() for funCpp().
  • distributedComputing() and runbg() gain libs, library paths put in front on the remote side.
  • compile() reports the toolchain and reused objects through message() rather than cat(), so suppressMessages() silences it.
  • Bug fixes. A summed objective keeps the curvature of every term. trust() accepts an objective that declines a Hessian. A backward solve without an answer is an error instead of a zero gradient. A PEtab prior honors hessian = FALSE. The batched backward path propagates more than one direction. compile() stays within the 8191-character command line of Windows.
  • New examples inst/examples/example_ReverseAD.R, example_AdjointComparison.R and example_BachmannReverse.R; the tests compile the models of each file jointly.

dMod2 0.7.5

  • runbg(compile = TRUE) builds on Debian and Ubuntu machines: the generated build script asks the remote R for R.home("include"), as compile() does locally.
  • runbg(compile = TRUE) compiles in parallel: the core count of the build ignores the OpenMP variables. runbg() also gains buildCores and buildBundle, as distributedComputing() has.

dMod2 0.7.4

  • A prepared ODE batch handle does not outlive the shared object it was resolved from: the cache of Xs() checks that the object is loaded, modelname<- drops it, and the rename loop in runbg() and distributedComputing() covers objectives.
  • Needs cppDE 0.9.5, where a Windows install detects OpenMP, so a batched solve runs in parallel there.

dMod2 0.7.3

  • SBML and PEtab import work in a fresh session: .dmod_libsbml_python() initializes Python before it reads reticulate::py_exe() and rejects an empty path.
  • A test covers the interpreter resolution itself, outside the guard .libsbml_works(), which turns any error into a skip.

dMod2 0.7.2

  • trust() reports the iterate the run reached, also where the run ends on fvalue, preddiff, step or the iteration limit: argument, value, gradient, hessian and atBound, and with them vcov(), confint() and profiles, belong to the last accepted point.
  • trust() takes hessianFallback and fallbackLimit. The fallback takes over at the first value, model, step or stagnation stop instead of ending the run; fallbackLimit above one alternates back to the primary source at the next such stop, re-seeding a Gauss-Newton phase from a fresh Hessian at the cost of one evaluation. hessianMethod = "hybrid" is gone, not deprecated: a run is a method and, optionally, a fallback, and no pair has a separate name. "hybrid" corresponds to "gn" with hessianFallback = "bfgs", and trust() says so when it is passed.
  • as.parframe() includes nSwitch, the number of Hessian source handovers, so a multi-start can be scored on them.
  • trustL1() is gone; the L1 penalty, the clustering of the penalty and the EM layer that uses it are on devel-EM. constraintL1() stays as the Laplace prior.
  • createExample(), exmpextr() and extractExamples() are gone.
  • distributedComputing() and runbg() attach dMod2 on the remote machine and nothing else; a job that needs another package attaches it in the job expression.
  • trust() groups the arguments into tolControl, qnControl and stepControl. The flat ftol, mtol, gtol, xtol, rmin, boundary, theta.max, hessianInit, qnMemory and qnCautious are gone, not deprecated; trust() and mstrust() name the control member a moved argument became. trustL1 keeps the flat tolerances.
  • trust() takes qnControl$qnRejected (SR1 also updates from a rejected trial point, Nocedal and Wright sec. 6.2; default TRUE wherever an SR1 phase can occur) and stepControl$nonmonotone (Zhang-Hager acceptance, default 0, the monotone rule).

dMod2 0.7.1

  • trust() ends a quasi-Newton run on the gradient. fvalue, preddiff and step read the prediction of the quadratic model, which during a quasi-Newton phase describes the approximation being built rather than the iterate, so they do not terminate such a run; gradient, stagnation and the radius do.
  • trust() takes an interchangeable Hessian source through hessianMethod. "gn" (default) is the Gauss-Newton J^T J; "bfgs" and "sr1" maintain a dense quasi-Newton update seeded from it; "hybrid" runs "gn" until it stagnates, then switches to "bfgs" once. The quasi-Newton phase consumes only the gradient. Reflective boundary only.
  • Objective functions take a call-time hessian argument. With hessian = FALSE the J^T J contraction never runs and the result has a NULL hessian. trust() uses this in the quasi-Newton phase, and it propagates through objective composition.
  • trust() reports neval and, under blather, the hessianSource per iteration, so a multi-start can be scored on gradient evaluations. These reach as.parframe() as columns.
  • mstrust() drops the deprecated studyname argument. Use name.
  • compile() builds model shared objects on Windows: the per-source link and the combined-output object compile go through system2(), so the .dll links against BLAS, LAPACK and the Sundials solver.
  • Adds inst/examples/example_Boehm_JProteomeRes2014.R, which builds the model of that publication and compares the Hessian sources over a multi-start.
  • define() and insert() resolve the values passed through ... in the frame they were called from, also inside a function or a knitr chunk. Condition columns and .currentSymbols keep precedence over the calling frame. The internal names of insert() are not visible to those values; .currentTrafo and .currentSymbols are the documented way to reach the branch being rewritten.
  • plotValues() marks a converged fit with a circle and an unconverged one with a triangle, in every plot, and keeps both in the legend.
  • subset() on a parframe evaluates the condition against the columns of the frame and then in the frame it was written in, also from inside a function.
  • Adds the Optimisation vignette on Hessian sources, seeding and the economics of a multi-start, shipped pre-rendered, with inst/benchmarks/bench_hessianSource.R behind the numbers of the vignette.
  • Attaching the package reports that BLAS is pinned to one thread inside the forked workers of mstrust() and profile(), and says so when no thread-control entry point was found and the deadlock is still reachable. options(dMod.quiet = TRUE) suppresses the line. The pin itself is cppDE’s and needs no cooperation here; requires cppDE 0.9.4.

dMod2 0.7.0

  • PEtab import and export. importPEtab() reads a v1 or v2 problem and returns the composed g * x * p, the error model, the objective with the priors and the published parameter vector. exportPEtabObject() writes one back, and exportPEtab() builds a problem from a hand-written dMod model.
  • SBML import and export through libsbml, reached over reticulate, so a problem that needs neither stays Python-free. Identifiers that R or C++ reserve are renamed throughout, including in the PEtab tables, and the MathML constants pi, exponentiale and avogadro are folded to their value.
  • normL2() returns gradient and Hessian in the order of the parameter vector it was called with, the order in which trust() and optim() read them.
  • normL2() reports the sum of squares as a chi2 attribute. Adding objectives pools the terms sharing an attr.name and splits the rest into chi2_<attr.name>.
  • compile(output = ) points the cOde models inside a function object at the batched shared object.
  • Pre-equilibration takes the conserved moieties from the same reduced network Pequil() uses, freezes a time dependent input at the start time, and leaves symbols no outer parameter reaches out of the sensitivity system. A failure reports the solver error and the non-finite parameters.
  • Y() accepts one observation function per condition and takes cores. importPEtab() takes cores, deriv, outdir, optionsOde and optionsSens, and derives a model name that steps aside for what is already loaded.
  • as.data.frame() on a prediction joins the error model by observable rather than by row order.
  • wide2long() on an unnamed list numbers the conditions instead of dropping the condition column, and forwards keep and na.rm.
  • print() on an objective result from a deriv = FALSE call shows the value alone.
  • New data set bachmann with inst/examples/example_BachmannMSB2011.R building the model: 25 states, 36 conditions, 113 estimated parameters.
  • All 31 cases of the PEtab v2 test suite reproduce the published likelihood and survive the export round trip. Of the 35 problems in the Benchmark-Models collection, 33 import, evaluate with derivatives, export and reimport.

dMod2 0.6.5

  • compile(output = ) does not link into a shared object the process already holds. A loaded name is replaced by <name>_2 with a warning, the rule cppDE’s model constructors apply to their names.

dMod2 0.6.4

dMod2 0.6.3

  • normL2() takes t0, the time at which initial values take effect. The time grid starts there rather than at 0, so a prediction may begin after 0.
  • The error model keeps the fixed parameters under deriv = FALSE.
  • Xt() reports the fixed parameters, as Xs() does, so an error model can read them off the prediction.
  • eqnlist() accepts a model without species, which is a parameter-only problem rather than an error.
  • The steady-state heuristic evaluates SBML’s piecewise() and declares a state structurally zero only when the rate of the state vanishes at zero alone.

dMod2 0.6.2

  • Reloading the shared object of a model invalidates nothing. cppDE (>= 0.9.2) resolves entry points by name, so the batch handle cached by Xs(), and every objective built on it, survives an unload and reload. This replaces the symbol-cache flush counter of 0.6.1.
  • loadDLL() also searches the directories the sources were generated in, so a model compiled into a temporary folder is found.
  • normL2() attaches compileInfo, as * and + do, so loadDLL() and compile() reach the shared objects of a composed objective.

dMod2 0.6.1

  • loadDLL() skips shared objects that are already loaded in the current process, so the native symbol pointers of the functions built from them stay valid.
  • The prepared batch handle that Xs() caches, which holds a native symbol pointer, is rebuilt whenever the symbol cache is flushed.

dMod2 0.6.0

  • The core is complete: equations, compiled prediction, observation and parameter transformations, objectives, trust region optimization and profile likelihood. The PEtab, symmetry, mixed effects and Bayesian layers live on separate development branches.
  • Test suite over equations, compilation, prediction, objectives, the trust region and profiles.

dMod2 0.5.21

  • plotProfile(), plotPaths() and plotValues() build on one long-format frame; the parlist overlay is measured against the profile optimum.
  • dMod palettes, theme_dMod() and the color scales.

dMod2 0.5.20

  • runbg() runs jobs in the background on a local or remote host.
  • distributedComputing() spreads fits and profiles over a cluster.

dMod2 0.5.19

  • reml() estimates the error model from the restricted likelihood, charging each data point with the leverage of that point.
  • remlLeverage() reports the hat values, their rank and the effective degrees of freedom per observable.

dMod2 0.5.18

dMod2 0.5.17

dMod2 0.5.16

  • Pexpl(), Pimpl() and Pequil() build explicit, implicit and equilibrated parameter transformations.
  • define(), insert(), branch() and repar() assemble transformations.
  • Warm starts are kept per condition, so a condition restarts from the previous root of that condition.

dMod2 0.5.15

  • Xs() hands every condition to cppDE::solveODEBatch() in one call.
  • Y() and P(method = "explicit") evaluate all conditions in one call.
  • cores is a call-time argument on every function object and defaults to getOption("dMod.cores", 1L).

dMod2 0.5.14

  • Fixed: composing a condition-less function with a multi-condition one kept only the first condition and returned an unnamed result.

dMod2 0.5.13

  • The loop over experimental conditions moved from outside a composed chain into the leaves of the chain, so a leaf sees every condition at once and can batch them.
  • Predictions and objectives are identical across thread counts.

dMod2 0.5.12

  • Constraint and parameter-vector kernels in C++.

dMod2 0.5.11

dMod2 0.5.10

  • normL2() evaluates the data term in a C++ kernel.

dMod2 0.5.9

  • Residual kernel in C++, with error models and BLOQ handling (M1, M3, M4NM, M4BEAL).

dMod2 0.5.8

  • compile() links model sources into one shared object, with compile and link flags taken per file from the backend that produced it.
  • Objects are reused when source and command are unchanged, recorded in a .dMod_objects index.

dMod2 0.5.7

  • odemodel() generates C++ with first and second order sensitivities. Backends cppDE, Sundials and deSolve.

dMod2 0.5.6

  • An eventlist is declared on odemodel(), so the sensitivity equations are extended consistently.

dMod2 0.5.5

dMod2 0.5.4

  • Package entry point renamed to dMod2.

dMod2 0.5.3

  • Symmetry detection and SBML import moved out of the core.

dMod2 0.5.2

  • Removed dModFrame, dfoptim and normIndiv.

dMod2 0.5.1

  • The per-author tools*.R files are merged into utils.R and accessors.R.

dMod2 0.5.0

  • Fork of dMod 0.5.