Learn R Programming

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

mrgsolve (version 1.0.3)

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

Version

1.0.3

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Kyle T Baron

Last Published

March 21st, 2022

Functions in mrgsolve (1.0.3)

blocks

Return the code blocks from a model specification file
Req

Request simulated output
PKMODEL

Parse PKMODEL BLOCK data
as.ev

Coerce an object to class ev
as_deslist

Create a list of designs from a data frame
BLOCK_PARSE

Functions to parse code blocks
aboutsolver

About the lsoda differential equation solver used by mrgsolve
as.list,mrgsims-method

Coerce an mrgsims object to list
as.list,mrgmod-method

Coerce a model object to list
as_data_set

Create a simulation data set from ev objects
code

Extract the code from a model
collapse_matrix

Collapse the matrices of a matlist object
ev

Event objects for simulating PK and other interventions
ev_assign

Replicate a list of events into a data set
collapse_omega

Collapse OMEGA or SIGMA matrix lists
env_eval

Re-evaluate the code in the ENV block
details

Extract model details
carry_out

Select items to carry into simulated output
cama

Run the model cama function
cmtn

Get the compartment number from a compartment name
cmt_list-class

S4 cmt_list class
cvec

Create create character vectors
ev_seq

Schedule a series of event objects
ev_repeat

Repeat a block of dosing events
ev_rx

Create intervention objects from Rx input
env_update

Update objects in model environment
ev-class

S4 events class
data_set

Select and modify a data set for simulation
evd

Create an event object with data-like names
exdatasets

Example input data sets
expand.idata

Create template data sets for simulation
env_get

Return model environment
design

Set observation designs for the simulation
expand_observations

Insert observations into a data set
env_ls

List objects in the model environment
file_show

Show model specification and C++ files
ev_ops

Operations for ev objects
mod

Return the model object
lower2matrix

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

Create a matrix
loadso

Load the model shared object
is.mrgmod

Check if an object is a model object
ev_days

Schedule dosing events on days of the week
mrgsim

Simulate from a model object
mrgsim_q

Simulate from a model object with quicker turnaround
numeric2diag

Create a diagonal numeric matrix from diagonal elements
modlib_pkpd

modlib: Pharmacokinetic / pharmacodynamic models
is.mrgsims

Check if an object is mrgsim output
c,matlist-method

Operations with matlist objects
numericlist-class

S4 class numeric list
ev_rep

Replicate an event object
modlib_tmdd

modlib: Target mediated disposition model
$,ev-method

Select columns from an ev object
mutate.ev

dplyr verbs for event objects
mrgsims_dplyr

Methods for handling output with dplyr verbs
mrgsims

Methods for working with mrgsims objects
plot,batch_mrgsims,missing-method

Plot method for mrgsims objects
plot_mrgsims

Generate a quick plot of simulated data
knobs

Run sensitivity analysis on model settings
inventory

Check whether all required parameters needed in a model are present in an object
init

Methods for working with the model compartment list
ev_methods

Various methods for event objects
numerics_only

Prepare data.frame for input to mrgsim
numericlist

Methods for numericlist
matlist-class

S4 class matlist
matlist

Methods for working with matrix-list objects
reserved

Reserved words
lctran

Change the case of nmtran-like data items
read_nmext

Extract estimates from NONMEM ext file
mrgsim_variants

mrgsim variant functions
realize_addl

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

Create matrices from vector input
nmext

Import model estimates from a NONMEM ext file
mrgsims-class

S4 class for mrgsolve simulation output
as_bmat

Coerce R objects to block or diagonal matrices
reexports

Objects exported from other packages
render

Render a model to a document
mcRNG

Set RNG to use L'Ecuyer-CMRG
touch_funs

Get inits from compiled function
revar

Get model random effect variances and covariances
tgrid

Create a simtime object
tscale

Re-scale time in the simulated output
house

Return a pre-compiled, PK/PD model
c,tgrid-method

Operations with tgrid objects
update

Update the model object
nmxml

Import model estimates from a NONMEM xml file
valid_data_set

Validate and prepare a data sets for simulation
modelparse

Parse model specification text
omega

Manipulate OMEGA matrices
idata_set

Select and modify a idata set for simulation
modlib_details

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

Internal model library
outvars

Show names of current output variables
mrgsims_modify

Methods for modifying mrgsims objects
modlib_pk

modlib: Pharmacokinetic models
mrgsolve

mrgsolve
show,mrgmod-method

Print model details
mcode

Write, compile, and load model code
show,parameter_list-method

Show the parameter list
merge.list

Merge two lists
summary.mrgmod

Print summary of a mrgmod object
stime

Get the times at which the model will be evaluated
modlib_viral

modlib: HCV viral dynamics models
mread

Read a model specification file
obsaug

Augment observations in the simulated output
mrgmod-class

S4 class for mrgsolve model object
obsonly

Collect only observations in the simulated output
qsim

Basic, simple simulation from model object
plot_sims

Plot data as an mrgsims object
soloc

Return the location of the model shared object
scrape_opts

Scrape options from a code block
solversettings

Optional inputs for lsoda
$,mrgmod-method

Select parameter values from a model object
scrape_and_call

Scrape options and pass to function
zero_re

Zero out random effects in a model object
see

Print model code to the console
param

Create and work with parameter objects
valid_idata_set

Validate and prepare idata data sets for simulation
parameter_list-class

S4 parameter_list class
show,cmt_list-method

Show the compartment list
mvgauss

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

Get all names from a model object
sigma

Manipulate SIGMA matrices
wf_sweep

Simulate a sequence of parameters
simargs

Access or clear arguments for calls to mrgsim
within

Update parameters, initials, and settings within a model object
%>%

Forward pipe