Package: dMod 2026.06

dMod: Dynamic Modeling and Parameter Estimation in ODE Models

The framework provides functions to generate ODEs of reaction networks, parameter transformations, observation functions, residual functions, etc. The framework follows the paradigm that derivative information should be used for optimization whenever possible. Therefore, all major functions produce and can handle expressions for symbolic derivatives.

Authors:Daniel Kaschek

dMod_2026.06.tar.gz
dMod_2026.06.zip(r-4.7)dMod_2026.06.zip(r-4.6)dMod_2026.06.zip(r-4.5)
dMod_2026.06.tgz(r-4.6-any)dMod_2026.06.tgz(r-4.5-any)
dMod_2026.06.tar.gz(r-4.7-any)dMod_2026.06.tar.gz(r-4.6-any)
dMod_2026.06.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
dMod/json (API)

# Install 'dMod' in R:
install.packages('dMod', repos = c('https://dkaschek.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/dkaschek/dmod/issues

Datasets:
  • BAdata - Time-course data for the Bile Acid model The dataset used in the dMod publication: Kaschek D, Mader W, Fehling-Kaschek M, Rosenblatt M, Timmer J. Dynamic modeling, parameter estimation, and uncertainty analysis in R. Journal of Statistical Software. 2019 Apr 30;88:1-32.
  • jakstat - Time-course data for the JAK-STAT cell signaling pathway

On CRAN:

Conda:

9.59 score 23 stars 267 scripts 211 downloads 9 mentions 128 exports 37 dependencies

Last updated from:0780136657. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK177
source / vignettesOK294
linux-release-x86_64OK192
macos-release-arm64OK131
macos-oldrel-arm64OK140
windows-develOK166
windows-releaseOK150
windows-oldrelOK239
wasm-releaseOK146

Exports:%.*%+.objlistaddEventaddReactionappendObjappendParframesas.datalistas.eqnlistas.eqnvecas.eventlistas.objlistas.parframeas.parlistas.parvecas.prdlistattrsblockdiagSymbbranchc.parlistcheckout_hypothesiscombinecomparecompileconservedQuantitiesconstraintL2controlscontrols<-coordTransformcovariatescreateExampledatalistdatapointL2definedMod.framedoteqnlisteqnveceventlistexmpextrextractExamplesfitErrorModelforcingsSymbformat.eqnvecfunC0getConditionsgetDerivsgetElementsgetEquationsgetFluxesgetLocalDLLsgetObservablesgetParametersgetReactionsgetStepIndicesgetStepsggopenginvIdinsertis.datalistis.eqnlistis.eqnvecis.parframelbindload.parlistloadDLLlong2widelsdModmatch.fnargsmnamemodelnamemodelname<-msParframemstrustmutatedMod.framenllnormL2nullZobjframeobjlistobsfnodemodelPparfnparframeparlistparvecPexplPimplplotCombinedplotDataplotFluxesplotParsplotPathsplotPredictionplotProfileplotResidualsplotValuesprdfnprdframeprdlistprint0priorL2profileprogressBarreduceReplicatesreparresresolveRecurrencerrefscale_color_dModscale_fill_dModsubmatrixsubset.eqnlisttheme_dModtrusttrustL1vcovwide2longwide2long.data.framewide2long.listwide2long.matrixwrite.eqnlistXdXfXsXtY

Dependencies:clicOdecodetoolscpp11data.tabledeSolvedoParalleldplyrfarverforeachgenericsggplot2gluegtableisobanditeratorslabelinglifecyclemagrittrpillarpkgconfigplyrR6RColorBrewerRcpprlangrootSolveS7scalesstringistringrtibbletidyselectutf8vctrsviridisLitewithr

The Operators + and * in dMod

Rendered fromconcatenation.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-07
Started: 2018-11-26

Dynamic Modeling and Parameter Estimation with dMod

Rendered fromdMod.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-07
Started: 2016-03-18

Event Estimation

Rendered fromevent_estimation.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-07
Started: 2018-11-14

Accessing Information in dMod Objects

Rendered fromgetFunctions.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-07
Started: 2018-11-14

List objects in dMod

Rendered fromlists.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-07
Started: 2018-11-28

Using different ODE solves with dMod

Rendered fromsolvers.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-07
Started: 2018-11-28

Explicit and Implicit Transformations

Rendered fromPimpl_Pexpl.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-07
Started: 2018-11-14

Readme and manuals

Help Manual

Help pageTopics
Concatenation of functions*.fn prodfn
Multiplication of objective functions with scalars%.*%
Direct sum of datasets+.datalist sumdatalist
Direct sum of functions+.fn sumfn
Direct sum of objective functions+.objfn sumobjfn
Add two lists element by element+.objlist sumobjlist
Add reaction to reaction tableaddReaction
Append an objective function to a basic dMod.frameappendObj
Make a column "parframes" out of "fits"appendParframes
Coerce to a Data Frameas.data.frame.datalist as.data.frame.prdlist
Coerce equation list into a data frameas.data.frame.eqnlist
Coerce to an equation vectoras.eqnvec as.eqnvec.character as.eqnvec.eqnlist
Coerce to eventlistas.eventlist as.eventlist.data.frame as.eventlist.list
Generate objective list from numeric vectoras.objlist
Coerce object to a parameter frameas.parframe as.parframe.parlist
Select a parameter vector from a parameter frame.as.parvec.parframe
Select attributes.attrs
Time-course data for the Bile Acid model The dataset used in the dMod publication: Kaschek D, Mader W, Fehling-Kaschek M, Rosenblatt M, Timmer J. Dynamic modeling, parameter estimation, and uncertainty analysis in R. Journal of Statistical Software. 2019 Apr 30;88:1-32.BAdata
Embed two matrices into one blockdiagonal matrixblockdiagSymb
Build the est.grid from prd, fixed.grid, conditional and condition.gridbuild_est.grid
Do some consistency checks on conditional and condition.gridcheck_cond
Some consistency checks for fixed.grid and est.gridcheck_grids
Load one row of a dMod.frame into the .GlobalEnvcheckout_hypothesis
Combine several data.frames by rowbindcombine
Compare two objects and return differencescompare compare.character compare.data.frame compare.eqnvec compare.list
Compile one or more prdfn, obsfn or parfn objectscompile
Profile uncertainty extractionconfint.parframe
Determine conserved quantites by finding the kernel of the stoichiometric matrixconservedQuantities
Compute a differentiable box priorconstraintExp2
Soft L2 constraint on parametersconstraintL2
List, get and set controls for different functionscontrols controls.fn controls.objfn controls<- controls<-.fn controls<-.objfn
Coordinate transformation for data framescoordTransform
Access the covariates in the datacovariates covariates.data.frame covariates.datalist covariates.tbl_df
Open a unit test template.createExample
Generate a datalist objectas.datalist as.datalist.data.frame as.datalist.list c.datalist datalist is.datalist names<-.datalist
L2 objective function for validation data pointdatapointL2
Define parameter transformations by 'define()', 'branch()' and 'insert()'branch define insert
Generate a dMod.framedMod.frame
Symbolic time derivative of equation vector given an equation listdot
Generate eqnlist objectas.eqnlist as.eqnlist.data.frame eqnlist is.eqnlist
Generate equation vector objecteqnvec is.eqnvec
EventlistaddEvent eventlist
Extract an example from a unit test file.exmpextr
Alternative version of expand.gridexpand.grid.alt
Extract example from unit tests.extractExamples
Fit an error modelfitErrorModel
Return some useful forcing functions as stringsforcingsSymb
Encode equation vector in format with sufficient spacesformat.eqnvec
Evaluation of algebraic expressions defined by charactersfunC0
Get coefficients from a charactergetCoefficients
Extract the conditions of an objectgetConditions getConditions.fn getConditions.list getConditions.tbl_df
Extract the derivatives of an objectgetDerivs getDerivs.list getDerivs.objlist getDerivs.parvec getDerivs.prdframe getDerivs.prdlist
Get Symbols and Numeric constants from a charactergetElements
Extract the equations of an objectgetEquations getEquations.fn getEquations.odemodel getEquations.prdfn
Generate list of fluxes from equation listgetFluxes
Determine loaded DLLs available in working directorygetLocalDLLs
Extract the observables of an objectgetObservables getObservables.tbl_df
Extract the parameters of an objectgetParameters getParameters_dispatch getParameters_dispatch.eqnlist getParameters_dispatch.eventlist getParameters_dispatch.fn getParameters_dispatch.odemodel getParameters_dispatch.parvec getParameters_dispatch.prdframe getParameters_dispatch.prdlist
Extract parameter names from est.gridgetParameters_est.grid
Generate a table of reactions (data.frame) from an equation listgetReactions
Get the indices of the n largest (not necessarily best) steps of a parframegetStepIndices
Get the rows of the n largest steps of a parframegetSteps
Open last plot in external pdf viewerggopen
Generalized Inverse of a Matrixginv
An identity function which vanishes upon concatenation of fnsId
Create an objlist with zeros as entriesinit_empty_objlist
Time-course data for the JAK-STAT cell signaling pathwayjakstat
Bind named list of data.frames into one data.framelbind
Construct fitlist from temporary files.load.parlist
Load shared object for a dMod objectloadDLL
Translate long to wide format (inverse of wide2long.matrix)long2wide
Print list of dMod objects in .GlobalEnvlsdMod
Extract individualized parameters for one IDmake_pars
dMod match function argumentsmatch.fnargs
Get modelname from single object (used internally)mname mname.character mname.fn mname.NULL mname.objfn
Get and set modelnamemodelname modelname<- modelname<-.fn modelname<-.objfn
Reproducibly construct "random" parframesmsParframe
Non-Linear Optimization, multi startmstrust
A version of dplyr::mutatemutatedMod.frame
Compute the negative log-likelihoodnll
Non-linear log likelihood for the ALOQ part of the datanll_ALOQ
Non-linear log likelihood for the BLOQ part of the datanll_BLOQ
L2 norm between data and model predictionnormIndiv normL2
Find integer-null space of matrix AnullZ
Objective frameobjframe
Generate objective listobjlist
Observation functionobsfn
Generate the model objects for use in Xs (models with sensitivities)odemodel
Generate a parameter transformation functionP
Parameter transformation functionparfn
Generate a parameter frameis.parframe parframe subset.parframe [.parframe
Parameter listas.parlist c.parlist parlist summary.parlist
Parameter vectoras.parvec as.parvec.numeric c.parvec parvec [.parvec
Parameter transformationPexpl
Parameter transformation (implicit)Pimpl
Plot a list data pointsplot.datalist
Plot a parameter list.plot.parlist
Plot a list of model predictions and a list of data points in a combined plotplot.prdframe plot.prdlist plotCombined plotCombined.prdlist plotCombined.tbl_df
Plot a list data pointsplotData plotData.data.frame plotData.datalist plotData.tbl_df
Plot Fluxes given a list of flux EquationsplotFluxes
Plot parameter values for a fitlistplotPars plotPars.parframe plotPars.tbl_df
Profile likelihood: plot of the parameter paths.plotPaths plotPaths.list plotPaths.parframe plotPaths.tbl_df
Plot a list of model predictionsplotPrediction plotPrediction.prdlist plotPrediction.tbl_df
Profile likelihood plotplotProfile plotProfile.list plotProfile.parframe plotProfile.tbl_df
Plot residuals for a fitlistplotResiduals
Plotting objective values of a collection of fitsplotValues plotValues.parframe plotValues.tbl_df
Prediction functionprdfn
Prediction frameprdframe
Prediction listas.prdlist as.prdlist.list prdlist
Model Predictionspredict.prdfn
Print or pander equation listprint.eqnlist
Print equation vectorprint.eqnvec
Pretty printing parameter transformationsprint.parfn
Pretty printing for a parameter vectorprint.parvec
Print object and its "default" attributes only.print0
L2 objective function for prior valuepriorL2
Profile-likelihood (PL) computationprofile
Progress barprogressBar
Reduce replicated measurements to mean and standard deviationreduceReplicates
Rename the derivatives of an objective function according to a lookup tablerename_objlist
Reparameterizationrepar
Compare data and model prediction by computing residualsres
Place top elements into bottom elemensresolveRecurrence
Transform matrix A into reduced row echelon form this function is written along the lines of the rref-matlab function.rref
Standard dMod color palettescale_color_dMod
Standard dMod color schemescale_fill_dMod
Gather statistics of a fitliststat.parlist
Elide character vectorstrelide
Pad string to desired widthstrpad
Submatrix of a matrix returning ALWAYS a matrixsubmatrix
subset of an equation listsubset.eqnlist
Summary of an equation vectorsummary.eqnvec
Standard plotting theme of dModtheme_dMod
Non-Linear Optimizationtrust trustL1
Extract those lines of a parameter frame with unique elements in the value columnunique.parframe
Get variance-covariance matrix from trust resultvcov
Translate wide output format (e.g. from ode) into long formatwide2long
Translate wide output format (e.g. from ode) into long formatwide2long.data.frame
Translate wide output format (e.g. from ode) into long formatwide2long.list
Translate wide output format (e.g. from ode) into long formatwide2long.matrix
Write equation list into a csv filewrite.eqnlist
Model prediction function from data.frameXd
Model prediction function for ODE models without sensitivities.Xf
Model prediction function for ODE models.Xs
Generate a prediction function that returns timesXt
Observation functions.Y