# Simulate from ODE-Based Models

## Documentation for package ‘mrgsolve’ version 2.0.1

- DESCRIPTION file.
- Package NEWS.

## Help Pages

A B C D E F G H I K L M N O P Q R S T U V W Y Z misc

mrgsolve-package | mrgsolve: Simulate from ODE-Based Models

## -- A --

aboutsolver | About the lsoda differential equation solver used by mrgsolve
allparam | Create and work with parameter objects
as.ev | Coerce an object to class ev
as.ev-method | Coerce an object to class ev
as.evd | Create an event object with data-like names
as.list-method | Coerce a model object to list
as.list-method | Coerce an mrgsims object to list
as.tbl.mrgsims | Methods for handling output with dplyr verbs
assign_ev | Replicate a list of events into a data set
as_bmat | Coerce R objects to block or diagonal matrices
as_bmat-method | Coerce R objects to block or diagonal matrices
as_cmat | Coerce R objects to block or diagonal matrices
as_data_frame.mrgsims | Methods for handling output with dplyr verbs
as_data_set | Create a simulation data set from ev objects or data frames
as_data_set-method | Create a simulation data set from ev objects or data frames
as_deslist | Create a list of designs from a data frame
as_dmat | Coerce R objects to block or diagonal matrices
as_dmat-method | Coerce R objects to block or diagonal matrices
as_tibble.mrgsims | Methods for handling output with dplyr verbs

## -- B --

blocks | Return the code blocks from a model specification file
blocks-method | Return the code blocks from a model specification file
BLOCK_PARSE | Functions to parse code blocks
bmat | Create matrices from vector input

## -- C --

c-method | Operations with matlist objects
c-method | Operations with tgrid objects
CAPTURE | Functions to parse code blocks
carry.out | Select items to carry into simulated output
carry_out | Select items to carry into simulated output
check_data_names | Check input data set names against model parameters
cmat | Create matrices from vector input
CMT | Functions to parse code blocks
cmtn | Get the compartment number from a compartment name
cmtn-method | Get the compartment number from a compartment name
code | Extract the code from a model
collapse_matrix | Collapse the matrices of a matlist object
collapse_omega | Collapse OMEGA or SIGMA matrix lists
collapse_sigma | Collapse OMEGA or SIGMA matrix lists
convert_fort_if | DSL preprocessing functions
convert_pow | DSL preprocessing functions
convert_semicolons | DSL preprocessing functions
custom_atol | Customize tolerances for specific compartments
custom_rtol | Customize tolerances for specific compartments
custom_tol | Customize tolerances for specific compartments

## -- D --

data_set | Select a data set for simulation
data_set-method | Select a data set for simulation
design | Set observation designs for the simulation
details | Extract model details
distinct.mrgsims | Methods for handling output with dplyr verbs
dmat | Create matrices from vector input
do.mrgsims | Methods for handling output with dplyr verbs
do_mrgsim | Simulate from a model object
dsl_preprocess | DSL preprocessing functions

## -- E --

env_eval | Re-evaluate the code in the ENV block
env_get | Return model environment or objects from the model environment
env_get.mrgmod | Return model environment or objects from the model environment
env_get.mrgsims | Return model environment or objects from the model environment
env_get_env | Return model environment or objects from the model environment
env_get_env.mrgmod | Return model environment or objects from the model environment
env_get_env.mrgsims | Return model environment or objects from the model environment
env_get_obj | Return model environment or objects from the model environment
env_ls | List objects in the model environment
env_update | Update objects in model environment
ev | Event objects for simulating PK and other interventions
ev-method | Event objects for simulating PK and other interventions
evd | Create an event object with data-like names
evd-method | Create an event object with data-like names
evd_expand | Create template data sets for simulation
ev_assign | Replicate a list of events into a data set
ev_days | Schedule dosing events on days of the week
ev_expand | Create template data sets for simulation
ev_rep | Replicate an event object
ev_repeat | Repeat a block of dosing events
ev_rx | Create intervention objects from Rx input
ev_rx-method | Create intervention objects from Rx input
ev_seq | Schedule a series of event objects
exBoot | Example input data sets
exdatasets | Example input data sets
exidata | Example input data sets
expand.ev | Create template data sets for simulation
expand.evd | Create template data sets for simulation
expand.idata | Create template data sets for simulation
expand_observations | Insert observations into a data set
exTheoph | Example input data sets
extran1 | Example input data sets
extran2 | Example input data sets
extran3 | Example input data sets

## -- F --

filter.ev | dplyr verbs for event objects
filter.mrgsims | Methods for handling output with dplyr verbs
filter_sims | Methods for modifying mrgsims objects
FIXED | Functions to parse code blocks

## -- G --

get_tol | Extract rtol and atol information from a model object
get_tol_list | Extract rtol and atol information from a model object
group_by.mrgsims | Methods for handling output with dplyr verbs

## -- H --

HANDLEMATRIX | Functions to parse code blocks

## -- I --

idata_set | Select a idata set for simulation
idata_set-method | Select a idata set for simulation
INIT | Functions to parse code blocks
init | Methods for working with the model compartment list
init-method | Methods for working with the model compartment list
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
is.mrgsims | Check if an object is mrgsims output

## -- K --

knobs | DEFUNCT: Run sensitivity analysis on model settings

## -- L --

lctran | Change the case of nmtran-like data items
lctran.data.frame | Change the case of nmtran-like data items
lctran.ev | Change the case of nmtran-like data items
loadso | Load the model shared object
loadso.mrgmod | Load the model shared object

## -- M --

matrix_helpers | Create matrices from vector input
mcode | Write, compile, and load model code
mcode_cache | Write, compile, and load model code
mcRNG | Set RNG to use L'Ecuyer-CMRG
modlib | Internal model library
modlib_details | modlib: PK/PD Model parameters, compartments, and output variables
modlib_pk | modlib: Pharmacokinetic models
modlib_pkpd | modlib: Pharmacokinetic / pharmacodynamic models
modlib_tmdd | modlib: Target mediated disposition model
modlib_viral | modlib: HCV viral dynamics models
mread | Read a model specification file
mread_cache | Read a model specification file
mread_file | Read a model specification file
mread_yaml | Read a model from yaml format
mrgsim | Simulate from a model object
mrgsims_dplyr | Methods for handling output with dplyr verbs
mrgsims_modify | Methods for modifying mrgsims objects
mrgsim_0 | mrgsim variant functions
mrgsim_d | mrgsim variant functions
mrgsim_df | Simulate from a model object
mrgsim_di | mrgsim variant functions
mrgsim_e | mrgsim variant functions
mrgsim_ei | mrgsim variant functions
mrgsim_i | mrgsim variant functions
mrgsim_q | Simulate from a model object with quicker turnaround
mrgsim_variants | mrgsim variant functions
mrgsolve | mrgsolve: Simulate from ODE-Based Models
mutate.ev | dplyr verbs for event objects
mutate.mrgsims | Methods for handling output with dplyr verbs
mutate_sims | Methods for modifying mrgsims objects
mwrite_cpp | Write a model to native mrgsolve format
mwrite_yaml | Write model code to yaml format

## -- N --

names-method | Get all names from a model object
nmext | Import model estimates from a NONMEM ext file
NMXML | Import model estimates from a NONMEM xml file
nmxml | Import model estimates from a NONMEM xml file
numerics_only | Prepare data.frame for input to mrgsim()

## -- O --

obsaug | Augment observations in the simulated output
obsonly | Collect only observation records in the simulated output
omat | Manipulate OMEGA matrices
omat-method | Manipulate OMEGA matrices
OMEGA | Manipulate OMEGA matrices
omega | Manipulate OMEGA matrices
outvars | Show names of current output variables

## -- P --

PARAM | Functions to parse code blocks
param | Create and work with parameter objects
param-method | Create and work with parameter objects
param_tags | Return parameter tags
parse_rx | Create intervention objects from Rx input
PKMODEL | Parse PKMODEL BLOCK data
plot | Generate a quick plot of simulated data
plot-method | Generate a quick plot of simulated data
plot_mrgsims | Generate a quick plot of simulated data
plot_sims | Plot data as an mrgsims object
pull.mrgsims | Methods for handling output with dplyr verbs

## -- Q --

qsim | Basic, simple simulation from model object

## -- R --

read_nmext | Extract estimates from NONMEM ext file
realize_addl | Make addl doses explicit in an event object or data set
realize_addl.data.frame | Make addl doses explicit in an event object or data set
realize_addl.ev | Make addl doses explicit in an event object or data set
Req | Request simulated output
req | Request simulated output
req.mrgmod | Request simulated output
reserved | Reserved words
reset_atol | Reset all model tolerances
reset_rtol | Reset all model tolerances
reset_tol | Reset all model tolerances
revar | Get model random effect variances and covariances
revar-method | Get model random effect variances and covariances

## -- S --

see | Print model code to the console
see-method | Print model code to the console
select.ev | dplyr verbs for event objects
select.mrgsims | Methods for handling output with dplyr verbs
select_sims | Methods for modifying mrgsims objects
seq.ev | Schedule a series of event objects
SIGMA | Manipulate SIGMA matrices
sigma | Manipulate SIGMA matrices
simargs | Access or clear arguments for calls to mrgsim()
slice.mrgsims | Methods for handling output with dplyr verbs
smat | Manipulate SIGMA matrices
smat-method | Manipulate SIGMA matrices
soloc | Return the location of the model shared object
solversettings | Optional inputs for lsoda
summarise.each | Methods for handling output with dplyr verbs
summarise.mrgsims | Methods for handling output with dplyr verbs
summary.mrgmod | Print summary of a mrgmod object

## -- T --

tgrids_*_numeric | Operations with tgrid objects
tgrids_+_numeric | Operations with tgrid objects
tgrid_*_numeric | Operations with tgrid objects
tgrid_+_numeric | Operations with tgrid objects
THETA | Functions to parse code blocks
tscale | Re-scale time in the simulated output

## -- U --

uctran | Change the case of nmtran-like data items
uctran.data.frame | Change the case of nmtran-like data items
uctran.ev | Change the case of nmtran-like data items
update | Update the model object
update-method | Update the model object
use_custom_tol | Set up a model object to use either scalar or custom tolerances
use_scalar_tol | Set up a model object to use either scalar or custom tolerances

## -- V --

valid_data_set | Validate and prepare data sets for simulation
valid_data_set.matrix | Validate and prepare data sets for simulation
valid_idata_set | Validate and prepare idata data sets for simulation

## -- W --

warn_int_div | DSL preprocessing functions
within | Update parameters, initials, and settings within a model object
within-method | Update parameters, initials, and settings within a model object
within.mrgmod | Update parameters, initials, and settings within a model object

## -- Y --

yaml_to_cpp | Read a model from yaml format

## -- Z --

zero_re | Zero out random effects in a model object
zero_re-method | Zero out random effects in a model object

## -- misc --

$-method | Select columns from an ev object
$-method | Select parameter values from a model object
*-method | Operations with tgrid objects
+-method | Operations with tgrid objects
[-method | Select parameter values from a model object
[[-method | Select columns from an ev object
[[-method | Select parameter values from a model object