Learn R Programming

⚠️There's a newer version (1.5.2) of this package.Take me there.

mrgsolve (version 1.3.0)

Simulate from ODE-Based Models

Description

Fast simulation from ordinary differential equation (ODE) based models typically employed in quantitative pharmacology and systems biology.

Copy Link

Version

Install

install.packages('mrgsolve')

Monthly Downloads

1,214

Version

1.3.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

December 4th, 2023

Functions in mrgsolve (1.3.0)

ev-class

S4 events class
env_eval

Re-evaluate the code in the ENV block
design

Set observation designs for the simulation
env_get

Return model environment
evd

Create an event object with data-like names
ev

Event objects for simulating PK and other interventions
exdatasets

Example input data sets
ev_days

Schedule dosing events on days of the week
ev_assign

Replicate a list of events into a data set
ev_ops

Operations for ev objects
cmt_list-class

S4 cmt_list class
ev_methods

Various methods for event objects
ev_rx

Create intervention objects from Rx input
ev_seq

Schedule a series of event objects
details

Extract model details
$,ev-method

Select columns from an ev object
mutate.ev

dplyr verbs for event objects
knobs

Run sensitivity analysis on model settings
is.mrgsims

Check if an object is mrgsim output
inventory

Check whether all required parameters needed in a model are present in an object
is.mrgmod

Check if an object is a model object
matlist-class

S4 class matlist
env_update

Update objects in model environment
mcRNG

Set RNG to use L'Ecuyer-CMRG
env_ls

List objects in the model environment
lower2matrix

Create a square numeric matrix from the lower-triangular elements
matrix_helpers

Create matrices from vector input
as_bmat

Coerce R objects to block or diagonal matrices
expand_observations

Insert observations into a data set
expand.idata

Create template data sets for simulation
modMATRIX

Create a matrix
ev_rep

Replicate an event object
ev_repeat

Repeat a block of dosing events
modlib

Internal model library
modlib_details

modlib: PK/PD Model parameters, compartments, and output variables
mcode

Write, compile, and load model code
file_show

Show model specification and C++ files
init

Methods for working with the model compartment list
modlib_tmdd

modlib: Target mediated disposition model
idata_set

Select and modify a idata set for simulation
mod

Return the model object
modlib_viral

modlib: HCV viral dynamics models
lctran

Change the case of nmtran-like data items
loadso

Load the model shared object
merge.list

Merge two lists
house

Return a pre-compiled, PK/PD model
modlib_pkpd

modlib: Pharmacokinetic / pharmacodynamic models
c,matlist-method

Operations with matlist objects
modlib_pk

modlib: Pharmacokinetic models
modelparse

Parse model specification text
matlist

Methods for working with matrix-list objects
mread

Read a model specification file
mrgmod-class

S4 class for mrgsolve model object
numerics_only

Prepare data.frame for input to mrgsim
mrgsolve-package

mrgsolve: Simulate from ODE-Based Models
mrgsim

Simulate from a model object
mvgauss

Simulate from a multivariate normal distribution with mean zero
$,mrgmod-method

Select parameter values from a model object
mrgsims_dplyr

Methods for handling output with dplyr verbs
numeric2diag

Create a diagonal numeric matrix from diagonal elements
nmxml

Import model estimates from a NONMEM xml file
mrgsims_modify

Methods for modifying mrgsims objects
outvars

Show names of current output variables
mrgsims-class

S4 class for mrgsolve simulation output
nmext

Import model estimates from a NONMEM ext file
names,mrgmod-method

Get all names from a model object
param

Create and work with parameter objects
mrgsims

Methods for working with mrgsims objects
mrgsim_variants

mrgsim variant functions
plot_sims

Plot data as an mrgsims object
mrgsim_q

Simulate from a model object with quicker turnaround
numericlist-class

S4 class numeric list
numericlist

Methods for numericlist
param_tags

Return parameter tags
scrape_opts

Scrape options from a code block
parameter_list-class

S4 parameter_list class
scrape_and_call

Scrape options and pass to function
omega

Manipulate OMEGA matrices
obsonly

Collect only observations in the simulated output
sigma

Manipulate SIGMA matrices
qsim

Basic, simple simulation from model object
simargs

Access or clear arguments for calls to mrgsim
render

Render a model to a document
reexports

Objects exported from other packages
reserved

Reserved words
revar

Get model random effect variances and covariances
update

Update the model object
valid_data_set

Validate and prepare a data sets for simulation
show,mrgmod-method

Print model details
show,parameter_list-method

Show the parameter list
obsaug

Augment observations in the simulated output
valid_idata_set

Validate and prepare idata data sets for simulation
wf_sweep

Simulate a sequence of parameters
see

Print model code to the console
tgrid

Create a simtime object
c,tgrid-method

Operations with tgrid objects
within

Update parameters, initials, and settings within a model object
plot_mrgsims

Generate a quick plot of simulated data
plot,batch_mrgsims,missing-method

Plot method for mrgsims objects
%>%

Forward pipe
realize_addl

Make addl doses explicit in an event object or data set
read_nmext

Extract estimates from NONMEM ext file
summary.mrgmod

Print summary of a mrgmod object
tscale

Re-scale time in the simulated output
touch_funs

Get inits from compiled function
show,cmt_list-method

Show the compartment list
stime

Get the times at which the model will be evaluated
zero_re

Zero out random effects in a model object
solversettings

Optional inputs for lsoda
soloc

Return the location of the model shared object
PKMODEL

Parse PKMODEL BLOCK data
BLOCK_PARSE

Functions to parse code blocks
Req

Request simulated output
aboutsolver

About the lsoda differential equation solver used by mrgsolve
cvec

Create create character vectors
data_set

Select and modify a data set for simulation
code

Extract the code from a model
as.list,mrgmod-method

Coerce a model object to list
as.ev

Coerce an object to class ev
cmtn

Get the compartment number from a compartment name
check_data_names

Check input data set names against model parameters
as.list,mrgsims-method

Coerce an mrgsims object to list
as_deslist

Create a list of designs from a data frame
cama

Run the model cama function
blocks

Return the code blocks from a model specification file
carry_out

Select items to carry into simulated output
as_data_set

Create a simulation data set from ev objects
collapse_omega

Collapse OMEGA or SIGMA matrix lists
collapse_matrix

Collapse the matrices of a matlist object