Assembly of Pharmacometric Models

Construct pharmacometric nonlinear mixed effect models by combining predefined model components and automatically generate model code for NONMEM. Models are created by combining parameter and observation models, algebraic relationships, compartments, and flows. Pharmacokinetic models can be assembled from the higher-order components: absorption, distribution, and elimination. The generated code is optimized for performance by recognizing, for example, linear differential equations or differential equations with an analytic solution.


assemblerr

R-CMD-check Codecov testcoverage CRANstatus

assemblerr is an R package to construct pharmacometric models by combining pre-defined model components. It’s intended to simplify the specification of complex pharmacometric models and provide a mechanism to generate models in an automatic way. With assemblerr, models are specified using R code and then converted to a NONMEM control stream.

Installation

You can install the latest CRAN version assemblerr using:

install.packages("assemblerr")

Quick start

Load assemblerr

library(assemblerr)

Build a simple model

m <- model() +
  input_variable("dose") +
  prm_log_normal("emax", median = 10, var_log = 0.09) +
  prm_log_normal("ed50", median = 50, var_log = 0.09) +
  algebraic(effect~emax*dose/(ed50 + dose)) +
  obs_additive(~effect, var_add = 1)

Generate NONMEM code

render(m) 
#> $PROBLEM
#> $INPUT DOSE ID DV
#> $DATA data.csv IGNORE=@
#> $PRED
#> EMAX = THETA(1) * EXP(ETA(1))
#> ED50 = THETA(2) * EXP(ETA(2))
#> EFFECT = EMAX * DOSE/(ED50 + DOSE)
#> Y = EFFECT + EPS(1)
#> $ESTIMATION METHOD=COND MAXEVAL=999999 
#> $THETA (0, 10, Inf) ; POP_EMAX
#> $THETA (0, 50, Inf) ; POP_ED50
#> $OMEGA 0.09 ; IIV_EMAX
#> $OMEGA 0.09 ; IIV_ED50
#> $SIGMA 1; RUV_ADD

Learning more

The best place to learn how to use assemblerr is the vignette “Getting Started”. It provides an overview of the functionality in assemblerr and helps you building your own models. A simple way to find it is using the vignette() function in R:

vignette("getting-started", package = "assemblerr")

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("assemblerr")

0.1.1 by Sebastian Ueckert, 5 years ago


https://github.com/UUPharmacometrics/assemblerr


Report a bug at https://github.com/UUPharmacometrics/assemblerr/issues


Browse source code at https://github.com/cran/assemblerr


Authors: Sebastian Ueckert [aut, cre, cph] , Mats O. Karlsson [sad] , Andrew C. Hooker [sad] , Rikard Nordgren [sad] , Simon Carter [rev] , Simon Buatois [rev] , João A. Abrantes [rev] , F. Hoffmann-La Roche Ltd. [fnd]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports purrr, rlang, magrittr, methods, glue, vctrs, cli, tidyselect

Suggests testthat, knitr, rmarkdown, covr, withr, markdown, devtools


See at CRAN