mrgsolve user guide

Author

Kyle Baron

Published

November 10, 2024

Introduction

Welcome to the mrgsolve user guide. The user guide is the main documentation source for how mrgsolve works and how to best use mrgsolve in your modeling and simulation project. As with most of the mrgsolve documentation, this is a work in progress. I am currently working to transition this to more of a reference resource, rather than demonstration. So key content in the user guide includes 2  Model specification on model specification, 1  Model components on model components and 8  Simulation sequence on the simulation sequence. Installation is a big topic but we defer to the wiki page for installation help since requirements tend to change frequently with new R releases. The other content is hopefully helpful as well. I’m leaving it all in place for now, but will gradually transition the “how-to” and demo type content over to the vignettes repository or the gallery repository (see below).

Please feel free to ask questions about anything mrgsolve-related on the issue tracker on the main github repo: https://github.com/metrumresearchgroup/mrgsolve/issues.

Overview

If you are accessing the user guide via html, you should be able to see a table of contents on the left. That has a lot of detail in there so I’m going to give you high-level overview of what is here (the high-level should be pretty clear in the pdfbook).

  • 1  Model components tells you about what is in the mrgsolve model object (like parameters, compartments, C++ functions and the like)
  • 2  Model specification tells you about model specification. There are two main sections to this chapter: 2.2 Code blocks) lists the different model code blocks and 2.3 Variables and Macros) lists the different variables that you can get (or set) in the different code blocks
  • 3  Read and write models shows some brief examples for how to read in model files as well as new functionality with mrgsolve 1.5.1 that lets you write a model back to file
  • 4  Input data sets shows you how to format input data sets
  • 5  Event objects shows you how to create and work with simple data set objects called event objects
  • 6  Model Matrices shows how to work with model matrices
  • 7  Simulated output tells you about the simulated output object and how you can work with it
  • 8  Simulation sequence dives into the simulation sequence, showing you the steps that mrgsolve takes to work through a problem
  • 9  Steady state gives the details on how mrgsolve advances the system to a pharmacokinetic steady state
  • 10  Plugins talks about different plugins you can use for more advanced modeling; to highlight a few here:
    • Subsection 10.4 evtools shows you syntax for doing dynamic dosing and other events via the evtools plugin
    • Subsection 10.2 nm-vars shows you an alternate model specification syntax that lets your model code look more like NONMEM (nm-vars plugin)
    • Subsection 10.1 autodec shows how you can have mrgsolve declare variables for you (autodec plugin)
    • Subsection 10.6 Rcpp shows how you can use functions from Rcpp to generate random numbers (Rcpp plugin)
  • 11  Modeled events talks about modeled events (discontinuities in the simulation that are triggered from within the model rather than from the data set)
  • 12  Topics is a collection of applied examples on different topics
  • 13  Questions and Answers are brief questions and answers providing some bits of information that don’t obviously fit into another chapter
  • 14  Installation provides links to some Wiki pages that can help with installation

PDF Version

This book is also available in pdf format here.

Other Resources


This book was assembled on Sun Nov 10 13:51:32 2024 with mrgsolve version 1.5.2.