Skip to contents

Converting models

Functions to convert NONMEM models

Main functions

convert_nonmem()
Convert NONMEM model to R syntax

Helper functions

conv_pow()
Convert infix power notation to prefix notation
convert_nmsyntax()
Convert NONMEM specific syntax to R syntax

Simulations in NONMEM

Functions to perform NONMEM Simulations

make_nmsimmodel()
Create a simulation model from original model
split_sim()
Split a large NONMEM simulation in chunks

Simulations in R

Functions to perform Simulations in R

dose_func()
Create data.frame with dosing for usage in simulation with deSolve
mdose()
Performs multiple dosing in case of analytical solution of model
model_validation()
Validates NONMEM estimation model with an mrgsolve simulation model

Shiny functionality

Functions to create and run shiny apps

mod2shiny()
Creates a basic simulation app for a given R model
settings2df()
Add settings to dataframe
overlaying()
Performs overlaying of simulations

General functionality

Functions general applicable for simulations

sample_par()
Sample model parameters from a multivariate normal distribution
sample_sim()
Sample model parameters for a simulation
simdata()
Create a simulation dataset for NONMEM simulation
tmpl_model()
Get coding for template models

Utility functions

Utility functions

cut_equal()
cut function for (appr.) equal intervals
get_est()
Get model estimates from NONMEM ext or model file
get_inits()
get the initial states for the differential equations
get_nmblock()
Get information from dollar blocks inside NONMEM control streams
get_param()
Get parameter values from model or ext file
get_parmvar()
Get the variables within a NONMEM model that should be passed to the simulation model
dput2()
Wrapper function around dput to provide more options
pos_clpar()
Get position of closing parenthesis
par_delete()
Delete parenthesis including a numeric within a vector
nmlistblock()
convert a block to a list