Learn R Programming

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

mrgsolve (version 0.8.12)

Simulate from ODE-Based Population PK/PD and Systems Pharmacology Models

Description

Facilitates simulation from hierarchical, ordinary differential equation (ODE) based models typically employed in drug development. A model specification file is created consisting of R and C++ code that is parsed, compiled, and dynamically loaded into the R session. Input data are passed in and simulated data are returned as R objects. A dosing event engine allows interventions (bolus and infusion) to be managed separately from the model code. Differential equations are solved with the 'DLSODA' routine in 'ODEPACK' ().

Copy Link

Version

Install

install.packages('mrgsolve')

Monthly Downloads

1,137

Version

0.8.12

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Kyle T Baron

Last Published

April 27th, 2018

Functions in mrgsolve (0.8.12)

BLOCK_PARSE

Functions to parse code blocks
ev_repeat

Repeat a block of dosing events
ev_seq

Schedule a series of event objects
knobs

Run sensitivity analysis on model settings.
lctran

Convert select upper case column names to lower case to conform to mrgsolve data expectations
loadso

Load the model shared object
lower2matrix

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

modlib: HCV viral dynamics models
modlist-class

S4 class matlist.
mrgsolve

mrgsolve
mvgauss

Simulate from a multivariate normal distribution with mean zero
numeric2diag

Create a diagonal numeric matrix from diagonal elements
numericlist-class

S4 class numeric list
rename_cols

rename columns from vector for new names
render

Render a model to a document
see

Print model code to the console
show,modlist-method

Show a modlist object.
%>%

Forward pipe.
as.list,mrgmod-method

Coerce a model object to list.
as_bmat

Coerce R objects to block or diagonal matrices
chain

Functions for chaining commands together
env_ls

List objects in the model environment
cmt_list-class

S4 cmt_list class
env_update

Update objects in model environment
init

Methods for working with the model compartment list
events

DEPRECATED: get an events object from a model object
exdatasets

Example input data sets.
inventory

Check whether all required parameters needed in a model are present in an object
c,matlist-method

Operations with matlist objects.
mcRNG

Set RNG to use L'Ecuyer-CMRG
modlist

Create a modlist object.
mread

Read a model specification file
mrgsim_variants

mrgsim variant functions
mrgsims-class

S4 class for mrgsolve simulation output.
param

Create and work with parameter objects
parameter_list-class

S4 parameter_list class
reserved

Reserved words.
revar

Get model random effect variances and covariances
simargs

Access or clear arguments for calls to mrgsim
soloc

Return the location of the model shared object
as_data_set

Create a simulatinon data set from ev objects
tgrid

Create a simtime object
c,tgrid-method

Operations with tgrid objects
as_deslist

Create a list of designs from a data frame
cmtn

Get the compartment number from a compartment name
code

Extract the code from a model
ev-class

S4 events class
ev

Event objects for simulating PK and other interventions
mutate.ev

dplyr verbs for event objects
ev_methods

Various methods for event objects
is.mrgmod

Check if an object is a model object
is.mrgsims

Check if an object is mrgsim output.
mcode

Write, compile, and load model code
merge.list

Merge two lists
as.list,mrgsims-method

Corece an mrgsims object to list
cama

Run the model cama function
as.ev

Coerce an object to class ev
modlib_pkpd

modlib: Pharmacokinetic / pharmacodynamic models
carry_out

Select items to carry into simulated output
modlib_tmdd

modlib: Target mediated disposition model
mrgsims

Methods for working with mrgsims objects.
data_set

Select and modify a data set for simulation
mrgsims_dplyr

Methods for handling output with dplyr verbs
plot_mrgsims

Generate a quick plot of simulated data
design

Set observation designs for the simulation
plot,batch_mrgsims,missing-method

Plot method for mrgsims objects.
recmatrix

Create a matrix of events for simulation
house

Return a pre-compiled, PK/PD model
ev_assign

Replicate a list of events into a data set
ev_days

Schedule dosing events on days of the week
idata_set

Select and modify a idata set for simulation
matlist-class

S4 class matlist
modelparse

Parse model specification text.
Req

Request simulated output
matlist

Methods for working with matrix-list objects
relocate

Update model or project in an model object
solversettings

Optional inputs for DLSODA
aboutsolver

About the ODEPACK differential equation solver used by mrgsolve
modlib

Internal model library.
blocks

Return the code blocks from a model specification file
stime

Get the times at which the model will be evaluated
names,mrgmod-method

Get all names from a model object
bmat

Create matrices from vector input
nmxml

Get THETA, OMEGA and SIGMA from a completed NONMEM run
env_eval

Re-evaluate the code in the ENV block
env_get

Return model environment
ev_ops

Operations for ev objects
obsonly

Collect only observations in the simulated output
plot_sims

Plot data as an mrgsims object
omega

Manipulate OMEGA matrices
ev_rep

Replicate an event object
expand.idata

Create template data sets for simulation
qsim

A quick simulation function
file_show

Show model specification and C++ files.
show,mrgmod-method

Print model details
mod

Return the model object
modMATRIX

Create a matrix
sigma

Manipulate SIGMA matrices
touch_funs

Get inits from compiled function
tscale

Rescale time in the simulated output
modlib_details

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

modlib: Pharmacokinetic models
mrgmod-class

S4 class for mrgsolve model object
mrgsim

Simulate from a model object
numericlist

Methods for numericlist
obsaug

Augment observations in the simulated output
read_nmext

Extract estimates from NONMEM ext file
realize_addl

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

Scrape options from a code block.
scrape_and_call

Scrape options and pass to function.
valid_data

Validate and prepare data sets for simulation
update

Update the model object
PKMODEL

Parse PKMODEL BLOCK data.
cvec

Create create character vectors
data_qsim

Create a matrix of events and observations for simulation
details

Extract model details.
do_mrgsim

Do an mrgsim run