Learn R Programming

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

mrgsolve (version 0.8.9)

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,043

Version

0.8.9

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Kyle T Baron

Last Published

August 28th, 2017

Functions in mrgsolve (0.8.9)

blocks

Return the code blocks from a model specification file.
bmat

Create matrices from vector input.
as_data_set

Create a simulatinon data set from ev objects.
as_deslist

Create a list of designs from a data frame.
cvec

Create create character vectors.
data_set

Select and modify a data set for simulation.
ev-class

S4 events class
ev_assign

Replicate a list of events into a data set.
exdatasets

Example input data sets.
expand.idata

Create template data sets for simulation.
Req

Request simulated output.
aboutsolver

About the ODEPACK differential equation solver used by mrgsolve.
chain

Functions for chaining commands together.
matlist

Methods for working with matrix-list objects.
c,matlist-method

Operations with matlist objects.
modlib

Internal model library.
modlib_details

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

Set observation designs for the simulation.
details

Extract model details.
ev_days

Schedule dosing events on days of the week.
as.list,mrgmod-method

Coerce a model object to list.
cmtn

Get the compartment number from a compartment name.
code

Extract the code from a model.
BLOCK_PARSE

Functions to parse code blocks.
PKMODEL

Parse PKMODEL BLOCK data.
cama

Run the model cama function.
carry_out

Select items to carry into simulated output.
as_bmat

Coerce R objects to block or diagonal matrices.
ev_ops

Operations for ev objects.
file_show

Show model specification and C++ files.
house

Return a pre-compiled, PK/PD model.
is.mrgsims

Check if an object is mrgsim output.
mread_cache

Read a model specification file.
mrgmod-class

S4 class for mrgsolve model object.
mrgsolve_template

Create model specification file from template
cmt_list-class

S4 cmt_list class
env_eval

Re-evaluate the code in the ENV block.
env_get

Return model environment.
ev_seq

Schedule a series of event objects
env_ls

List objects in the model environment.
env_update

Update objects in model environment.
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.
lctran

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

Event objects for simulating PK and other interventions.
mcRNG

Set RNG to use L'Ecuyer-CMRG.
mcode_cache

Write, compile, and load model code.
modMATRIX

Create a matrix.
knobs

Run sensitivity analysis on model settings.
modlib_tmdd

modlib: Target mediated disposition model.
modlib_viral

modlib: HCV viral dynamics models.
ev_rep

Replicate an event object
ev_repeat

Repeat a block of dosing events
idata_set

Select and modify a idata set for simulation.
init

Methods for working with the model compartment list.
lower2matrix

Create a square numeric matrix from the lower-triangular elements.
matlist-class

S4 class matlist.
modlib_pk

modlib: Pharmacokinetic models.
modlib_pkpd

modlib: Pharmacokinetic / pharmacodynamic models.
mrgsim

Simulate from a model object.
mrgsims-class

S4 class for mrgsolve simulation output.
nmxml

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

Create a diagonal numeric matrix from diagonal elements.
parameter_list-class

S4 parameter_list class
pkmodel

Simulate from 1- or 2-compartment PK model.
see

Print model code to the console.
show,modlist-method

Show a modlist object.
stime

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

Create a simtime object.
modelparse

Parse model specification text.
modlist-class

S4 class matlist.
modlist

Create a modlist object.
numericlist-class

S4 class numeric list.
numericlist

Methods for numericlist.
recmatrix

Create a matrix of events for simulation.
relocate

Update model or project in an model object.
show,mrgmod-method

Print model details.
sigma

Manipulate SIGMA matrices.
valid_data

Validate and prepare data sets for simulation.
%>%

Forward pipe.
loadso

Load the model shared object.
merge.list

Merge two lists.
mod

Return the model object.
mrgsolve_example

Extract example model from system library
mrgsolve

mrgsolve
mvgauss

Simulate from a multivariate normal distribution with mean zero.
rename_cols

rename columns from vector for new names
render

Render a model to a document.
simargs

Access or clear arguments for calls to mrgsim.
obsaug

Augment observations in the simulated output.
obsonly

Collect only observations in the simulated output.
qsim

A quick simulation function.
realize_addl

Make addl doses explicit in an event object or data set.
soloc

Return the location of the model shared object.
mrgsims

Methods for working with mrgsims objects.
mrgsims_dplyr

Methods for handling output with dplyr verbs.
omega

Manipulate OMEGA matrices.
$,mrgmod-method

Create and work with parameter objects.
plot,batch_mrgsims,missing-method

Plot method for mrgsims objects.
plot_mrgsims

Generate a quick plot of simulated data.
scrape_and_call

Scrape options and pass to function.
scrape_opts

Scrape options from a code block.
tscale

Rescale time in the simulated output.
update

Get all names from a model object.
reserved

Reserved words.
revar

Get model random effect variances and covariances.
c,tgrid-method

Operations with tgrid objects.
touch_funs

Get inits from compiled function.