Skip to main content
U.S. flag

An official website of the United States government

Here’s how you know

Dot gov

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

HTTPS

Secure .gov websites use HTTPS
A lock ( Lock A locked padlock ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

  • Environmental Topics
  • Laws & Regulations
  • Report a Violation
  • About EPA
Risk Assessment
Contact Us

MCSimMod: An R Package for Working with Ordinary Differential Equation Models Encoded in the MCSim Model Specification Language

On this page:

  • Overview
  • Downloads
In this paper, we present the R package MCSimMod for working with ordinary differential equation (ODE) models. R is a free and open-source programming language and environment popular among statisticians and scientists because of its data analysis and graphics generation capabilities. Working within the interactive R environment, users can quickly and easily obtain results for many simple or standard types statistical or graphical analyses, but unfortunately the complex calculations associated with performing ODE model simulations are performed relatively slowly for models encoded in R because R is an interpreted language. MCSim, which is another free and open-source software tool, was designed for the more specialized purposes of implementing and calibrating mathematical models. By taking advantage of the compiled language C, MCSimMod performs ODE model simulations relatively quickly. Using R and MCSim together allows one to define ODE models in a relatively simple language, translate and compile the models, and perform model simulations rapidly from within the R environment. However, installing R, MCSim, and other required software tools and ensuring that they work together properly can be an onerous process. To solve this problem, we developed the R package MCSimMod, which can be installed easily in the R programming environment. Notably, use of the package does not require installation of the MCSim software. To demonstrate the utility of MCSimMod, in this paper we illustrate how to perform various essential modeling tasks using several example ODE models. We show how to encode ODE models in the MCSim model specification language, set parameter values and initial conditions for the models, perform model simulations, introduce time-varying input parameters, and incorporate discrete events into model simulations. The MCSimMod package grants R users access to an efficient and easy-to-use set of tools for building and performing simulations with ODE models, and makes it easy for users to share their ODE models and modeling analyses with others. The views expressed in this manuscript are those of the authors and do not necessarily represent the views or policies of the U.S. Environmental Protection Agency.

Impact/Purpose

This Sub-Product consists of an manuscript to be submitted to a peer reviewed journal. The manuscript describes a new R package, MCSimMod, that can be used to implement and apply physiologically based pharmacokinetic (PBPK) models and other ordinary differential equation (ODE) models.

Citation

Kapraun, D., T. Zurlinden, R. Friese, AND A. Shapiro. MCSimMod: An R Package for Working with Ordinary Differential Equation Models Encoded in the MCSim Model Specification Language. Open Journals, Austin, TX, 10(112):8492, (2025). [DOI: 10.21105/joss.08492]

Download(s)

DOI: MCSimMod: An R Package for Working with Ordinary Differential Equation Models Encoded in the MCSim Model Specification Language
  • Risk Assessment Home
  • About Risk Assessment
  • Risk Recent Additions
  • Human Health Risk Assessment
  • Ecological Risk Assessment
  • Risk Advanced Search
    • Risk Publications
  • Risk Assessment Guidance
  • Risk Tools and Databases
  • Superfund Risk Assessment
  • Where you live
Contact Us to ask a question, provide feedback, or report a problem.
Last updated on September 30, 2025
United States Environmental Protection Agency

Discover.

  • Accessibility Statement
  • Budget & Performance
  • Contracting
  • EPA www Web Snapshots
  • Grants
  • No FEAR Act Data
  • Privacy
  • Privacy and Security Notice

Connect.

  • Data
  • Inspector General
  • Jobs
  • Newsroom
  • Open Government
  • Regulations.gov
  • Subscribe
  • USA.gov
  • White House

Ask.

  • Contact EPA
  • EPA Disclaimers
  • Hotlines
  • FOIA Requests
  • Frequent Questions

Follow.