157
Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara Princeton, NJ, USA 08540 December 3, 2018

Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

  • Upload
    others

  • View
    20

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

Trial Simulator for NONMEM ModelersExamples Guide

Applies to: NONMEM 7.3, Trial Simulator 2.3

Version 1

CertaraPrinceton, NJ, USA 08540

December 3, 2018

Page 2: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2

Legal disclaimer

This guide is provided for informational purposes only. Certara USA, Inc. makes no guarantyor warranty as to result or fitness of purpose, nor does Certara USA, Inc. assume any liabilitywhatsoever arising out of the use of this guide. NONMEM is not a product nor an affiliatedproduct of Certara USA, Inc. The guide is not an endorsement of NONMEM or a guarantyor warranty as to the use of NONMEM.

Contact information

Please use our user forum for asking questions related to this document as well as gettingtips and discussing software with others.

https://support.certara.com/forums/

If further assistance is needed, contact Certara Support through the following e-mail or website.

E-mail: [email protected]

Web: https://support.certara.com/support

CertaraR© copyright c©1998-2018, Certara USA, Inc. All rights reserved.

Page 3: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

Contents

List of Tables 9

List of Figures 11

1 Introduction 13

1.1 Notations and Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1.2 NONMEM versus Trial Simulator Codes . . . . . . . . . . . . . . . . . . . . 15

1.3 Trial Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

2 Models with Non-Constant Clearance 19

2.1 A One-Compartment Model with Michaelis-Menten Elimination for an IV Case 20

2.1.1 Uncorrelated Random Effects . . . . . . . . . . . . . . . . . . . . . . 20

2.1.2 Correlated Random Effects . . . . . . . . . . . . . . . . . . . . . . . . 26

2.2 A One-Compartment Model with Michaelis-Menten Elimination and First-order Absorption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

2.2.1 No Time Lag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

2.2.2 Time Lag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

2.3 A Two-Compartment Model with Continuously Time-Varying Clearance . . 32

2.3.1 Implementation in NONMEM . . . . . . . . . . . . . . . . . . . . . . 33

2.3.2 Implementation in Trial Simulator . . . . . . . . . . . . . . . . . . . . 34

3

Page 4: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4 CONTENTS

2.A NONMEM Codes: A One-Compartment Model with Michaelis-Menten Elim-ination for an IV Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

2.A.1 Uncorrelated Random Effects . . . . . . . . . . . . . . . . . . . . . . 37

2.A.2 Correlated Random Effects . . . . . . . . . . . . . . . . . . . . . . . . 38

2.B NONMEM Codes: A One-Compartment Model with Michaelis-Menten Elim-ination and First-order Absorption . . . . . . . . . . . . . . . . . . . . . . . 40

2.B.1 No Time Lag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

2.B.2 Time Lag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

2.C NONMEM Codes: A Two-Compartment Model with Continuously Time-Varying Clearance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

3 Target-Mediated Drug Disposition Models 47

3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

3.1.1 Basic Target-Mediated Drug Disposition Models . . . . . . . . . . . . 48

3.1.2 Approximations of Target-Mediated Drug Disposition Models . . . . 50

3.1.3 Notations and Parameter Values Used in the Simulation . . . . . . . 52

3.2 A Quasi-Equilibrium-Target-Mediated Drug Disposition Model with One Com-partment for an IV Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

3.2.1 Implementation in NONMEM . . . . . . . . . . . . . . . . . . . . . . 55

3.2.2 Implementation in Trial Simulator . . . . . . . . . . . . . . . . . . . . 56

3.3 A Quasi-Equilibrium-Target-Mediated Drug Disposition Model with Two Com-partments for an IV Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

3.4 A Quasi-Equilibrium-Target-Mediated Drug Disposition Model with One Com-partment and First-order Absorption . . . . . . . . . . . . . . . . . . . . . . 60

3.5 A Quasi-Equilibrium-Target-Mediated Drug Disposition Model with Two Com-partments and First-order Absorption . . . . . . . . . . . . . . . . . . . . . . 61

3.6 Wagner Model with One Compartment for an IV Case . . . . . . . . . . . . 63

3.7 Wagner Model with Two Compartments for an IV Case . . . . . . . . . . . . 64

Page 5: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

CONTENTS 5

3.8 Wagner Model with One Compartment and First-order Absorption . . . . . 66

3.9 Wagner Model with Two Compartments and First-order Absorption . . . . . 67

3.A NONMEM Codes: A Quasi-Equilibrium-Target-Mediated Drug DispositionModel with One Compartment for an IV Case . . . . . . . . . . . . . . . . . 70

3.B NONMEM Codes: A Quasi-Equilibrium-Target-Mediated Drug DispositionModel with Two Compartments for an IV Case . . . . . . . . . . . . . . . . 72

3.C NONMEM Codes: A Quasi-Equilibrium-Target-Mediated Drug DispositionModel with One Compartment and First-order Absorption . . . . . . . . . . 75

3.D NONMEM Codes: A Quasi-Equilibrium-Target-Mediated Drug DispositionModel with Two Compartments and First-order Absorption . . . . . . . . . 78

3.E NONMEM Codes: Wagner Model with One Compartment for an IV Case . . 81

3.F NONMEM Codes: Wagner Model with Two Compartments for an IV Case . 83

3.G NONMEM Codes: Wagner Model with One Compartment and First-orderAbsorption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

3.H NONMEM Codes: Wagner Model with Two Compartments and First-orderAbsorption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

4 Models with Discontinuous Actions 91

4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

4.1.1 How to schedule events at specific times in Trial Simulator? . . . . . 92

4.2 A Two-Compartment Model with Urine Compartment Reset Right After EachObservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

4.2.1 Implementation in NONMEM . . . . . . . . . . . . . . . . . . . . . . 94

4.2.2 Implementation in Trial Simulator . . . . . . . . . . . . . . . . . . . . 95

4.3 A First-order Absorption Model with Absorption Rate Discontinuously Changedat Specific Times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

4.3.1 Implementation in NONMEM . . . . . . . . . . . . . . . . . . . . . . 99

4.3.2 Implementation in Trial Simulator . . . . . . . . . . . . . . . . . . . . 100

4.4 A Zero-order Absorption Model without Time Lag . . . . . . . . . . . . . . . 102

Page 6: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

6 CONTENTS

4.4.1 Implementation in NONMEM . . . . . . . . . . . . . . . . . . . . . . 103

4.4.2 Implementation in Trial Simulator . . . . . . . . . . . . . . . . . . . . 104

4.5 A Zero-order Absorption Model with Time Lag . . . . . . . . . . . . . . . . 106

4.5.1 Implementation in NONMEM . . . . . . . . . . . . . . . . . . . . . . 107

4.5.2 Implementation in Trial Simulator . . . . . . . . . . . . . . . . . . . . 107

4.A NONMEM Codes: A Two-Compartment Model with Urine Comparment Re-set Right After Each Observation . . . . . . . . . . . . . . . . . . . . . . . . 109

4.B NONMEM Codes: A First-order Absorption Model with Absorption RateDiscontinuously Changed at Specific Times . . . . . . . . . . . . . . . . . . . 111

4.C NONMEM Codes: A Zero-order Absorption Model without Time Lag . . . . 114

4.D NONMEM Codes: A Zero-order Absorption Model with Time Lag . . . . . . 115

5 Models with Double Absorption Pathways 119

5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

5.1.1 Models with Two First-order Absorption Pathways . . . . . . . . . . 119

5.1.2 Mixed First-order and Zero-order Absorption Models . . . . . . . . . 120

5.2 A Simultaneous First-order Absorption Model . . . . . . . . . . . . . . . . . 122

5.2.1 First-order Clearance Rate . . . . . . . . . . . . . . . . . . . . . . . . 122

5.2.2 Michaelis-Menten Elimination . . . . . . . . . . . . . . . . . . . . . . 128

5.3 A Parallel First-order Absorption Model . . . . . . . . . . . . . . . . . . . . 129

5.4 A Simultaneous First-order and Zero-order Absorption Model . . . . . . . . 131

5.4.1 Implementation in NONMEM . . . . . . . . . . . . . . . . . . . . . . 132

5.4.2 Implementation in Trial Simulator . . . . . . . . . . . . . . . . . . . . 133

5.5 A Sequential First-order and Zero-order Absorption Model with the First-order Process Followed by the Zero-order Process . . . . . . . . . . . . . . . 135

5.6 A Sequential First-order and Zero-order Absorption Model with the Zero-orderProcess Followed by the First-order Process . . . . . . . . . . . . . . . . . . 139

Page 7: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

CONTENTS 7

5.A NONMEM Codes: A Simultaneous First-order Absorption Model . . . . . . 141

5.A.1 First-order Clearance Rate . . . . . . . . . . . . . . . . . . . . . . . . 141

5.A.2 Michaelis-Menten Elimination . . . . . . . . . . . . . . . . . . . . . . 143

5.B NONMEM Codes: A Parallel First-order Absorption Model . . . . . . . . . 145

5.C NONMEM Codes: A Simultaneous First-order and Zero-order AbsorptionModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

5.D NONMEM Codes: A Sequential First-order and Zero-order Absorption Modelwith First-order Process Followed by Zero-order Process . . . . . . . . . . . 149

5.E NONMEM Codes: A Sequential First-order and Zero-order Absorption Modelwith the Zero-order Process Followed by the First-order Process . . . . . . . 152

Bibliography 155

Index 157

Page 8: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

8 CONTENTS

Page 9: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

List of Tables

1.1 NONMEM versus TS codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.1 Structural model parameters and their values used in the simulation for a one-compartment model with Michaelis-Menten elimination in an IV case, whereall the random effects are uncorrelated. . . . . . . . . . . . . . . . . . . . . . 21

2.2 A fragment of the input dataset for a one-compartment model in an IV case. 22

2.3 Structural model parameters and their values used in the simulation for one-compartment models with Michaelis-Menten elimination and first-order ab-sorption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

2.4 A fragment of the input dataset for a one-compartment model with first-orderabsorption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

2.5 Structural model parameters and their values used in the simulation for atwo-compartment model with first-order absorption and time-varying clearance. 33

2.6 A fragment of the input dataset for a two-compartment model with first-orderabsorption in a multiple-dosing-event case. . . . . . . . . . . . . . . . . . . . 34

3.1 Model state variables in QE-TMDD models. . . . . . . . . . . . . . . . . . . 53

3.2 Structural model parameters and their values used in the simulation for QE-TMDD models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

3.3 A fragment of the input dataset for a QE-TMDD model with one compartment. 56

4.1 Blocks used to schedule events at specific times. . . . . . . . . . . . . . . . . 92

4.2 Structural model parameters and their values used in the simulation for atwo-compartment model in an IV case. . . . . . . . . . . . . . . . . . . . . . 94

9

Page 10: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

10 LIST OF TABLES

4.3 A fragment of the input dataset for a two-compartment model in an IV casewith urine compartment reset right after each observation. . . . . . . . . . . 95

4.4 Structural model parameters and their values used in the simulation for aone-compartment model with first-order absorption, where the value of theabsorption rate is discontinuously changed at specific times. . . . . . . . . . 99

4.5 A fragment of the input dataset for a first-order absorption model with theabsorption rate that is discontinuously changed at specific times. . . . . . . . 100

4.6 Structural model parameters and their values used in the simulation for aone-compartment model with Michaelis-Menten elimination and zero-orderabsorption that has no time lag. . . . . . . . . . . . . . . . . . . . . . . . . . 104

4.7 A fragment of the input dataset for a one-compartment model with zero-orderabsorption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

4.8 Structural model parameters and their values used in the simulation for aone-compartment model with Michaelis-Menten elimination and zero-orderabsorption that has a time lag. . . . . . . . . . . . . . . . . . . . . . . . . . 107

5.1 Structural model parameters and their values used in the simulation for modelswith two first-order absorption pathways. . . . . . . . . . . . . . . . . . . . . 120

5.2 Structural model parameters and their values used in the simulation for mixedfirst-order and zero-order absorption models. . . . . . . . . . . . . . . . . . . 121

5.3 A fragment of the input dataset for models with two first-order absorptionpathways. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

5.4 A fragment of the input dataset for mixed first-order and zero-order absorptionmodels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Page 11: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

List of Figures

1.1 Block properties of a Continuous Distribution block (left panel) and an Ex-pression block (right panel). . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2.1 The block properties of the Multivariate Distribution block for structuralmodel parameters in a one-compartment model with Michaelis-Menten elim-ination for an IV case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2.2 The block properties of the Procedure block for ODE (2.3). . . . . . . . . . . 24

2.3 The block properties of Test_Drug for a one-compartment model with Michaelis-Menten elimination in an IV case. . . . . . . . . . . . . . . . . . . . . . . . . 24

2.4 Treatments page: two arms are considered with each of them having a singledose administered at time 0 but with a different dose. . . . . . . . . . . . . . 25

2.5 The completed structural model as well as the residual error model in TS fora one-compartment model with Michaelis-Menten elimination in an IV case. 25

2.6 Block properties of a Multivariate Distribution block for (2.3) in the casewhere some of the random effects are assumed to be correlated. . . . . . . . 27

3.1 Schematic representation of a basic TMDD model with two compartments. . 48

3.2 Plasma concentration-time profile of a one-compartment TMDD model for anIV bolus case with different doses administered. . . . . . . . . . . . . . . . . 49

4.1 The block properties of Test_Drug (left panel) and DummyFormulation (rightpanel) for a first-order absorption model with the value of the absorption ratethat is discontinuously changed at TimePt_KaChange after each dose. . . . . 101

4.2 The properties of Formulation blocks for a one-compartment model with zero-order absorption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

11

Page 12: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

12 LIST OF FIGURES

5.1 Schematic representation of a one-compartment model with simultaneous first-order absorption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

5.2 The block properties of Test_Drug for a one-compartment model with simul-taneous first-order absorption. . . . . . . . . . . . . . . . . . . . . . . . . . . 124

5.3 The block properties of the Flow blocks for a one-compartment model withsimultaneous first-order absorption. . . . . . . . . . . . . . . . . . . . . . . . 125

5.4 The completed model in TS for a one-compartment model with simultaneousfirst-order absorption and first-order clearance rate from the central compart-ment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

5.5 The completed model in TS for a one-compartment model with simultane-ous first-order absorption and Michaelis-Menten elimination from the centralcompartment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

5.6 The block properties of Test_Drug (left panel) and Rep_Test_Drug (rightpanel) for a one-compartment model with parallel first-order absorption. . . 130

5.7 The completed model in TS for a one-compartment model with parallel first-order absorption and first-order clearance from the central compartment. . . 131

5.8 The block properties of Test_Drug for a one-compartment model with simul-taneous first-order and zero-order absorption. . . . . . . . . . . . . . . . . . 133

5.9 The block properties of DummyFormulation for a one-compartment model withsimultaneous first-order and zero-order absorption. . . . . . . . . . . . . . . . 134

5.10 The block properties of Rep_Test_Drug (left panel) and DummyFormulation

(right panel) for a one-compartment model with sequential first-order andzero-order absorption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

5.11 The block properties of Test_Drug (left panel) and the Procedure block (rightpanel) for a one-compartment model with sequential first-order and zero-orderabsorption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

Page 13: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

Chapter 1

Introduction

NONMEM is a software application for population pharmacokinetics/pharmacodynamicsanalysis. As a courtesy to Trial Simulator (TS) Users, we have created 23 hypotheticalexamples where NONMEM codes and the corresponding TS codes are provided so that usersmay use these examples as templates to enter their models in TS for clinical trial simulations.Using the characteristics of these models, we have grouped them into four categories andpresented them roughly in the order of increasing difficulty in implementing them in TS:models with non-constant clearance (Chapter 2), target-mediated drug disposition models(TMDD; Chapter 3), models with discontinuous actions (Chapter 4), and models with doubleabsorption pathways (Chapter 5).

For simplicity, all the models considered are basic structural models without any covariatesinvolved. Because the focus of these examples is for the drug model, the study designs arerather simple: parallel studies involve either two or three treatment arms, only one drug(called Test_Drug) is considered. Neither protocol deviations (event though they may beused as a trick to implement some of the models in TS) nor data analysis plans are consideredin these examples.

The reader is expected to have a basic knowledge of TS before reading this manual. Hence,a detailed step-by-step description on how to create a model and design will not be providedas this is in the Trial Simulator Examples Guide and Trial Simulator User Guide. We willfocus on the mathematical and scientific descriptions of the model as well as the key stepsin implementing the model.

1.1 Notations and Conventions

Multiple bolus dosing events. Let ndose denote the number of bolus dosing events givento an individual, and Dk be the dose administered at time tD,k for the kth dosing event,

13

Page 14: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

14 CHAPTER 1. INTRODUCTION

k = 1, 2, . . . , ndose.

Input to the central compartment. Input(t) denotes the input rate (amount per unitof time) of the drug into the central compartment at time t due to the administration of thedrug. For example, in the case for multiple IV bolus dosing events, we have

Input(t) =

ndose∑k=1

Dkδ(t− tD,k), (1.1)

where δ denotes the Dirac delta function (also called the unit impulse function)

δ(t) =

+∞, if t = 0,

0, otherwise,

with ∫ +∞

−∞δ(t)dt = 1.

In addition, in the case for multiple oral bolus dosing events with absorption assumed to befirst-order, we have (e.g., see [1])

Input(t) =

ndose∑k=1

Dkκa exp(−κa(t− tD,k))H(t− tD,k), (1.2)

where κa denotes the first-order absorption rate, and H is the Heaviside (or unit) stepfunction

H(t) =

1, if t ≥ 0,

0, otherwise.

Structural model parameters. Let N (µ, ω2) denote a normal distribution with mean µand standard deviation ω, and N (µ,Ω) represent a multivariate normal distribution withmean vector µ and variance-covariance matrix Ω. Following the conventions, if a structuralmodel parameter, Θ, is assumed to be log-normally distributed, then it is written in thefollowing form in the NONMEM codes

Θ = θtv exp(ηθ) (1.3)

where ηθ is normally distributed with mean 0 and standard deviation ω (i.e., ηθ ∼ N (0, ω2)).Based on the definition and property of the log-normal distribution,

log(Θ) ∼ N (log(θtv), ω2),

and the median value of Θ is θtv. This implies that, in the NONMEM codes, for thoselog-normally distributed parameters, the corresponding values displayed in $THETA block aretheir median values, and the ones in $Omega block are for the variance of their correspondinglogarithm part. This is important when one translates NONMEM codes into TS.

Page 15: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

1.2. NONMEM VERSUS TRIAL SIMULATOR CODES 15

Residual error model. Unless otherwise indicated, only the drug concentration at thecentral compartment is observable with the residual error assumed to be proportional/mul-tiplicative; that is,

Yij = C(tij)(1 + Eij), j = 1, 2, . . . , ni, i = 1, 2, . . . , NSUB. (1.4)

Here Yij denotes the j-th observation of the drug concentration at the central compartmentfor subject i at observation time tij, C(t) denotes the drug concentration at the centralcompartment at time t, and random variables Eij’s are assumed to be independent andidentically (i.i.d.) normally distributed with zero mean and constant variance σ2 (σ is set tobe 0.1 in the simulation for all the examples considered). In addition, ni denotes the numberof observations for subject i, and NSUB is the number of subjects.

1.2 NONMEM versus Trial Simulator Codes

Table 1.1 gives a rough comparison of NONMEM and TS codes in terms of dosing input,differential equations, structural model parameters, and residual error models. More detailedinformation is given below.

NONMEM TS

Dosing inputDataset$PK

Formulation block, Treatments page

Differential equations $DES Procedure block

Structural model parameters$PK

$THETA

$OMEGA

Continuous or Multivariate Distribu-tion block with the Level field set tobe “subject param”

Residual error model$SIGMA

$ERROR

Continuous or Multivariate Distribu-tion block with the Level field setto be “event”, Expression block, Re-sponse block

Table 1.1: NONMEM versus TS codes.

Dosing input. In NONMEM, the dose input is specified through the input dataset alongwith some reserved variables to specify the lag time for the dosing (ALAG1, ALAG2, etc.) andduration (D1, D2, etc.)/rate (R1, R2, etc.) in the $PK block. For example, AMT column in theinput dataset is used to specify the dose administered, CMT column is for the compartment towhich the dose is administered, ADDL and II columns are for additional doses administered.While, in TS, this is done through the Formulation block (e.g., to specify the lag time and

Page 16: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

16 CHAPTER 1. INTRODUCTION

the compartment to which the dose is administered) in the Drug Model Editor (DME) aswell as Treatments page (e.g., to specify dose and treatment schedules) under the NominalDesign (Protocol). Specifically, the “Dose to” property of the Formulation block is used tospecify the compartment to which the dose is administered, and hence it is similar to thefunctionality of CMT column in NONMEM. In addition, the “Lag” property of the Formulationblock is used to specify the lag time for the dosing, and hence it is similar to the reservedvariables ALAG1, ALAG2, etc., in NONMEM.

Differential equations. NONMEM provides a number of subroutines, such as ADVAN5 andADVAN7, to implicitly specify some special types of ordinary differential equations (ODEs).Besides this, it also provides a $DES block that can be used to explicitly define any type ofODEs. In TS, there are also two methods that can be used to specify ODEs. One is doneimplicitly with Compartment and Flow blocks. The other is to explicitly enter differentialequations into Procedure blocks (Blocks >Code Blocks >Procedure from the DMEmenu). It is worth noting that the Compartment and Flow blocks are restricted to thosepredefined ones, while the Procedure block does not have this restriction. Hence, in thissense, the Compartment and Flow blocks are similar to those predefined subroutines inNONMEM, and the Procedure block is similar to the $DES block.

Structural model parameters. For structural model parameters, they are implementedin NONMEM through the $PK, $THETA, and $OMEGA blocks. Specifically, these blocks areused to specify their mathematical form, typical values, and variability, respectively. While,in TS, this is done through the Continuous or Multivariate Distribution block with the Levelfield set to be “subject param”.

Residual error model. For the residual error model, it is implemented in NONMEMthrough the $SIGMA and $ERROR blocks. For example, for the proportional error model (1.4),NONMEM codes are given by

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

Y = C * (1 + EPS (1))

While, in TS, this can be done through Continuous Distribution blocks with the Level fieldset to be event, Expression and Response blocks. Below are the steps to translate the aboveNONMEM codes into TS.

• Add a Continuous Distribution block (e.g., by choosing Blocks >Math >Contin-

Page 17: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

1.2. NONMEM VERSUS TRIAL SIMULATOR CODES 17

uous Distribution from the DME menus) to specify the residual error. Specifically,enter the following information in the Block Properties dialog box (see the left panelof Figure 1.1):

– Block Name: Eps

– Type: Normal

– Level: event

– Mean: 0

– Var(x): 0.01

• Add an Expression block (e.g., by choosing Blocks >Code Blocks >Expressionfrom the DME menus) and enter the following information in the Block Propertiesdialog box to specify the residual error model (1.4) (see the right panel of Figure 1.1).

– Block Name: Y

– Expression: enter C * (1 + Eps) in the blue-shaded field.

• Add a Response block and enter the following information in the Block Propertiesdialog box to specify the observation.

– Block Name: DV

• Wire the Y output to the first input node of DV (by dragging the output of Y to thefirst input node of DV).

Figure 1.1: Block properties of a Continuous Distribution block (left panel) and an Expres-sion block (right panel).

Please note that other types of residual error models can be done similarly. Because theresidual error models in all the examples are assumed to be proportional, we will not discussthis further in the rest of this manual unless there is a need.

Page 18: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

18 CHAPTER 1. INTRODUCTION

1.3 Trial Simulator

For the convenience of readers, here we summarize those techniques that will be used mostoften in implementing these examples in TS.

How do I reference the dose in the code? In TS, the formulation name representsthe amount variable. Hence, doses may be manipulated directly in the model by referringto the formulation name in user code.

How do I add more than one formulation in a treatment arm? Sometimes, atreatment arm requires more than one formulation or dose. To do that, do the followingsteps:

• Highlight the treatment arm, and click the “Add Drug to Arm” button until there isone row within the treatment for each formulation and dose.

• Under Dose for each row, click to set the dose.

• Under Schedule for each row, select a schedule or create/change a schedule through<Edit Schedules. . .>.

Page 19: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

Chapter 2

Models with Non-Constant Clearance

Many drugs can be well described by a model with constant clearance (that is, the clearancerate does not change with dose). However, for some drugs, increased dose or chronic medica-tion use can change the clearance rate (e.g., see [2, 3]). Most often, this is due to a saturationof a clearance mechanism (which happens when the mechanism of clearance is dependentupon an enzyme system with fixed capacity). A common way to describe this phenomenonis to use the so-called Michaelis-Menten model where the clearance rate is dependent on thedrug concentration/amount. For example, a one-compartment model with Michaelis-Mentenelimination is given as follows:

A(t) = Input(t)− VmaxA(t)

κMV + A(t),

A(0) = 0.

(2.1)

Here A denotes the amount of drug at the central compartment, Input(t) denotes the inputrate (amount per unit of time) of the drug into the central compartment at time t due tothe administration of the drug, Vmax represents the maximum elimination rate (amount perunit time), κM denotes the drug concentration necessary to produce half of the maximumelimination rate, and V is the apparent volume of distribution for the central compartment.

Sometimes, the change in clearance is due to the change in the disease status. A commonway to handle this is to use a sigmoid Imax or Emax model (depending on whether theclearance is inhibited or stimulated over time). For example, the clearance rate described bya sigmoid Imax model is given by

cl(t) = cl,basic

(1− Imaxt

γ

tγ + T γ50

), (2.2)

where cl,basic is the maximum clearance rate, Imax denotes the maximum inhibition of theclearance (0 ≤ Imax ≤ 1), T50 is the time at which inhibition of the clearance is reduced byhalf of the maximum inhibition, and γ denotes the Hill coefficient that affects the steepnessof the sigmoidal shape.

19

Page 20: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

20 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

In the rest of this chapter, we will consider five examples with non-constant clearance, wherethe first four examples are for one-compartment models with Michaelis-Menten elimination,and the last example is a two-compartment model with a time-varying clearance rate givenby (2.2). For all of these examples, differential equations are specified through $DES inNONMEM and Procedure block in TS.

2.1 A One-Compartment Model with Michaelis-Menten

Elimination for an IV Case

In this section, we consider a one-compartment model with Michaelis-Menten elimination,(2.1), for an IV case. In this specific case, (2.1) is often rewritten as follows:

A(t) = − VmaxA(t)

κMV + A(t), (2.3)

where the dose enters into the system through the initial condition for variable A in eachdosing interval. For example, if a single bolus is administered at time 0 with dose D, thenA(0) = D.

In both NONMEM and TS, the ODE solver automatically stops when a dose is administered,and then resets the value for the dosing compartment, A, before it advances. In other words,the dosing events are scheduled events, and this information is automatically incorporatedinto the system without the need to explicitly specify the initial condition for the dosingcompartment. This becomes especially convenient in the case of multiple-dosing events.

Note that implementation of the structural model parameters is an important step in pop-ulation analysis. Hence, in the rest of this section, we will demonstrate how to implement(2.3) through two examples, one is with uncorrelated random effects, and the other is withcorrelated random effects.

2.1.1 Uncorrelated Random Effects

Here we consider (2.3) in the case where all the structural model parameters are assumed tobe log-normally distributed with all the random effects uncorrelated (see Table 2.1 for theirvalues used in the simulation).

Implementation in NONMEM. As discussed previously, because the structural modelparameters are assumed to be log-normal, they are written in the form of (1.3) in NONMEM,where the corresponding values displayed in the $THETA block are their median values, andthe ones in $Omega block are for the variance of their corresponding logarithm part. Thus,based on the information provided in Table 2.1, the codes for this part are given as follows:

Page 21: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.1. MICHAELIS-MENTEN MODEL FOR AN IV CASE 21

Param Code Meaning Distribution Median value ω

V Vapparent volume of distributionfor the central compartment

log-normal 5 0.1

κM Km

drug concentration necessary toproduce half of the maximumelimination rate

log-normal 1 0.1

Vmax Vmax maximum elimination rate log-normal 2 0.1

Table 2.1: Structural model parameters and their values used in the simulation for a one-compartment model with Michaelis-Menten elimination in an IV case, where all the randomeffects are uncorrelated. Please note that the “Code” column lists the corresponding nota-tions used in TS code blocks, and the same notation is also used in NONMEM code butwith all the characters in upper case. The “ω” column specifies the standard deviation ofthe logarithm of the corresponding random variables.

; ============= STRUCTURE MODEL PARAMETERS ==================

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV*EXP(ETA (1))

; KM = HALF SATURATION CONSTANT

TVKM = THETA (2)

KM = TVKM*EXP(ETA(2))

; VMAX = MAXIMUM ELIMINATION RATE

TVVMAX = THETA (3)

VMAX = TVVMAX*EXP(ETA(3))

; =========== INITIAL VALUES FOR THETA AND OMEGA ==============

$THETA

5 ;TVV

1 ;TVKM

2 ;TVVMAX

$OMEGA

0.01 ;ETA V

0.01 ; ETA KM

0.01 ; ETA VMAX

Page 22: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

22 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

The dosing information is implicitly incorporated into the model without the need to explic-itly specify the initial condition for the dosing compartment. Specifically, (2.3) is specifiedin $DES block as follows:

$DES

DADT (1) = -VMAX*A(1)/(KM*V + A(1))

And in the input dataset, one uses the CMT to specify the compartment to which the dose isadministered (in this case, it is compartment 1), and the AMT to specify the correspondingdose (see the highlighted row in cyan color in Table 2.6). The complete NONMEM codesfor this example are given in Appendix 2.A.1.

CID TIME AMT CMT DV

1 0.00 10 1 .

1 0.50 . . .

1 1.00 . . .

1 2.00 . . .

1 4.00 . . .

Table 2.2: A fragment of the input dataset for a one-compartment model in an IV case: thehighlighted row in cyan color indicates that a single bolus is administered at time 0 withdose D = 10.

Implementation in TS. The structural model parameters listed in Table 2.1 are specifiedin TS through the Multivariate Distribution block. Specifically, one adds a MultivariateDistribution block (by choosing Blocks >Math >Multivariate Distr. from the DMEmenus), and then enters the following information in its property dialog box (by right clickingthe block):

• Block Names: StructuralModelParams

• In the Parameter tab, add variables V, Km, and Vmax (by clicking the “Add Variable”button to add one variable at a time), and choose “subject param” from the drop-downlist of the “Level” field (see the left panel of Figure 2.1).

• In the Continuous tab, for each parameter, enter the following information (see theright panel of Figure 2.1 on how to enter the information for parameter V):

– Type: lognormal

– Median(x): enter the corresponding value shown in the “Median value” columnin Table 2.1.

Page 23: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.1. MICHAELIS-MENTEN MODEL FOR AN IV CASE 23

– sd(ln(x)): enter the corresponding value shown in the “ω” column in Table 2.1.

Figure 2.1: The block properties of the Multivariate Distribution block for structural modelparameters in a one-compartment model with Michaelis-Menten elimination for an IV case:(left panel) Parameter tab; (right panel) Continuous tab.

The ODE (2.3) is specified through the Procedure block. Specifically, one adds a Procedureblock (by choosing Blocks >Code Blocks >Procedure from the DME menus), and thenenters the following information in its property dialog box:

• Block Name: StructuralModel

• In the Integrator Variables tab, add the integrator variable A (by clicking the “AddIntegrator Variable” button and then entering A in the appeared box) - see the leftpanel of Figure 2.3.

• In the Code tab, enter the following information (see the right panel of Figure 2.3):

– Integrator initialization per subject: enter 0 for each integrator variable.

– Differential equation(s): In the blue-shaded field for “A'=”, enter

- Vmax*A/(Km*V + A)

The reason for setting A(0) to be zero or leaving it empty (in the blue-shaded field for“Integrator initialization per subject”) is that the dosing information will be implicitly in-corporated into the model. This is done through the Formulation block, Test_Drug, as wellas the Treatments page. Specifically, one enters the following information in the propertydialog box for Test_Drug to specify the compartment to which the dose is administered (inthis case, it is compartment Variable: A) - see Figure 2.3.

Page 24: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

24 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

Figure 2.2: The block properties of the Procedure block for ODE (2.3): Integrator Variabletab (left panel) and Code tab (right panel).

• Dose to: choose Variable: A from the drop-down list.

Figure 2.3: The block properties of Test_Drug for a one-compartment model with Michaelis-Menten elimination in an IV case.

Page 25: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.1. MICHAELIS-MENTEN MODEL FOR AN IV CASE 25

Then, in the Treatments page, one specifies the dose and dosing time points for each treat-ment arm that is considered (see Figure 2.4).

Figure 2.4: Treatments page: two arms are considered with each of them having a singledose administered at time 0 but with a different dose.

The completed structural model as well as the residual error model is given in Figure 2.5.

Figure 2.5: The completed structural model as well as the residual error model in TS for aone-compartment model with Michaelis-Menten elimination in an IV case.

Page 26: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

26 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

2.1.2 Correlated Random Effects

Here we consider (2.3) in the case where some of the random effects are assumed to becorrelated. Specifically, for this example, V is assumed to be log-normally distributed withmedian value being 5 and standard deviation of its corresponding logarithm part being 0.1;that is,

log(V ) ∼ N (log(5), 0.12). (2.4)

In addition, (log(κM), log(Vmax))T is assumed to be multivariate normally distributed

(log(κM), log(Vmax))T ∼ N

log(1)

log(2)

, 0.1 0.09

0.09 0.1

. (2.5)

Implementation in NONMEM. Implementation of this example in NONMEM is thesame as the one in the above section for uncorrelated random effects except the step ofspecifying the information for structural model parameters. Below are the codes for imple-mentation of structural model parameters based on the information provided in (2.4) and(2.5) (see Appendix 2.A.2 for the complete NONMEM codes).

; =============== STRUCTURE MODEL PARAMETERS ================

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV*EXP(ETA (1))

; KM = HALF SATURATION CONSTANT

TVKM = THETA (2)

KM = TVKM*EXP(ETA(2))

; VMAX = MAXIMUM ELIMINATION RATE

TVVMAX = THETA (3)

VMAX = TVVMAX*EXP(ETA(3))

; ============= INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

5 ;TVV

1 ;TVKM

2 ;TVVMAX

; FOR ETA V

$OMEGA

0.01

Page 27: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.1. MICHAELIS-MENTEN MODEL FOR AN IV CASE 27

; FOR ETA_KM AND ETA_VMAX

$OMEGA BLOCK (2)

0.1

0.09 0.1

Implementation in TS. Implementation of this example in TS is the same as the onein the above section for uncorrelated random effects, except that one needs to change theproperty information of the Multivariate Distribution block based on the one provided in(2.4) and (2.5).

• In the Parameter tab (see the left panel of Figure 2.6 for a snapshot):

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, logKm, and logVmax (by clicking the “Add Variable” button toadd one variable at a time).

– Add variable Km, check the “Derived” checkbox below the variable name, and thenenter exp(logKm) in the blue field that appears.

– Add variable Vmax, check the “Derived” checkbox below the variable name, andthen enter exp(logVmax) in the blue field that appears.

• In the Distributions tab, click the X button at the intersection of the column logKm

and the row logVmax (see the right panel of Figure 2.6).

Figure 2.6: Block properties of a Multivariate Distribution block for (2.3) in the casewhere some of the random effects are assumed to be correlated.

• In the Continuous tab, for V, enter the following information

Page 28: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

28 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

– Type: lognormal

– Median(x): 5

– sd(ln(x)): 0.1

For logKm X logVmax, enter the following information:

– Specify the multivariate distri-bution: normal

– Specify the type of matrix:click the “Variance/Covari-ance” radio button.

– Specify the parameters of eachnormal distribution: in the“Mean” column, enter themean vector as shown in (2.5)(that is, enter ln(1) for logKm

and ln(2) for logVmax).

– Specify the variance-covariancematrix: enter the covariancematrix as shown in (2.5).

2.2 A One-Compartment Model with Michaelis-Menten

Elimination and First-order Absorption

Here we consider (2.1) in the oral case where the absorption is assumed to be first-order.To implement such a model either in NONMEM or TS, it is more convenient to introducean absorption compartment, Aa, to let the software automatically incorporate the dosinginformation into the system. That is, for this case, (2.1) is rewritten as follows:

Aa = −κaAa,

A = κaAa −VmaxA

κMV + A,

(2.6)

with κa being the first-oder absorption rate, and A(0) = 0. Again, the dose enters into thesystem through the initial condition for variable Aa in each dosing interval.

Sometimes, one may find it is necessary to include lag time to better describe the absorptionprocess. For convenience, all the possible model parameters for the models considered inthis section are summarized in Table 2.3 as well as their distributions and values used in thesimulation. Note that all the structural model parameters are assumed to be log-normally

Page 29: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.2. MICHAELIS-MENTEN MODEL WITH FIRST-ORDER ABSORPTION 29

distributed. Hence, implementing the structural parameters in TS for this case is the sameas that in the above section. Thus, we will not discuss this in detail.

Param Code Meaning Distribution Median value ω

V Vapparent volume of distributionfor the central compartment

log-normal 5 0.1

κM Km

drug concentration necessary toproduce half of maximum elimi-nation rate

log-normal 1 0.1

Vmax Vmax maximum elimination rate log-normal 2 0.1

κa Ka first-order absorption rate log-normal 0.6 0.1

tlag Tlagtime lag for the first-order ab-sorption process

log-normal 0.5 0.1

Table 2.3: Structural model parameters and their values used in the simulation for one-compartment models with Michaelis-Menten elimination and first-order absorption. Pleasenote that the “Code” column lists the corresponding notations used in TS code blocks,and the same notation is also used in NONMEM code but with all the characters in uppercase for all the parameters except tlag (the reserved keyword ALAG1 needs to be used). The“ω” column specifies the standard deviation of the logarithm of the corresponding randomvariables.

2.2.1 No Time Lag

Here we consider (2.6) in the case where there is no time lag for the first-order absorptionprocess.

Implementation in NONMEM. Again, the dosing information is implicitly incorpo-rated into the model without the need to explicitly specify the initial condition for thedosing compartment, Aa. Specifically, (2.6) is specified in the $DES block as follows:

$DES

DADT (1) = - KA * A(1)

DADT (2) = KA * A(1) - VMAX*A(2)/(KM*V + A(2))

And in the input dataset, one uses the CMT to specify the compartment to which the dose isadministered (in this case, it is compartment 1), and the AMT to specify the correspondingdose (see the highlighted row in cyan color in Table 2.6). The complete NONMEM codesare given in Appendix 2.B.1.

Page 30: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

30 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

CID TIME AMT CMT DV

1 0.00 10 1 .

1 0.50 . . .

1 1.00 . . .

1 2.00 . . .

1 4.00 . . .

Table 2.4: A fragment of the input dataset for a one-compartment model with first-order ab-sorption (2.6): the highlighted row in cyan color indicates that a single bolus is administeredat time 0 with dose D = 10.

Implementation in TS. Again, the structural model parameters are specified in TSthrough the Multivariate Distribution block with the Level field set to be “subject param”.The dosing information is implicitly incorporated into the model through the property “Doseto” of Formulation block and the Treatments page, where the “Dose to” specifies the com-partment to which the dose is administered, and the Treatments papge is used to define thedose and dosing time points. Below are the key steps to implement this model in TS.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to specify those structural model parameters listed in Table 2.3.

• In the Parameter tab, add variables V, Km, Vmax, and Ka (see Table 2.3 for theirmeanings) and then choose “subject param” from the drop-down list of the Levelfield.

• In the Continuous tab, enter the information for V, Km, Vmax, and Ka based on theinformation provided in Table 2.3.

2. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (2.6).

• In the Integrator Variables tab, add integrator variables Aa and A.

• In the Code tab, enter the following information:

– Integrator initialization per subject: enter 0 for each integrator variable.

– Differential equation(s):In the blue-shaded field for “Aa'=”, enter -Ka*AaIn the blue-shaded field for “A'=”, enter

Ka*Aa - Vmax*A/(Km*V + A)

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered.

• Dose to: choose Variable: Aa from the drop-down list.

Page 31: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.2. MICHAELIS-MENTEN MODEL WITH FIRST-ORDER ABSORPTION 31

4. In the Treatments page, add Test_Drug in each of Treatment Arms considered, andthen specify the dose and schedules as planned.

2.2.2 Time Lag

Here we consider (2.6) in the case where there is a time lag for the first-order absorptionprocess.

Implementation in NONMEM. Implementation of this model is the same as the onein the section above for the model without time lag, except that one needs to add lag timefor the first-order absorption process through the reserved variable ALAG1 in the $PK block(see Appendix 2.B.2 for the complete NONMEM codes).

Implementation in TS. Implementing this model in TS is same as the one in the sectionabove for the model without time lag, except needing to add the variable Tlag in Step 1and make the following changes to Step 3 to incorporate the time lag for the first-orderabsorption process.

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered as wellas defining the time lag for the first-order absorption process.

• Dose to: choose “Variable: Aa” from the drop-down list.

• Lag: check the Lag checkbox and then enter Tlag in the blue-shaded field thatappears.

Page 32: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

32 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

2.3 A Two-Compartment Model with Continuously Time-

Varying Clearance

In this section, we consider a two-compartment model with first-order absorption

A(t) = κaAa(t)− cl(t)C(t)− cl2(C(t)− C2(t)),

A2(t) = cl2(C(t)− C2(t)),

Aa(t) = −κaAa(t),

(2.7)

where the clearance rate, cl, is described by sigmoid Imax model (2.2). Here A, A2, andAa denote the amount of drug at the central, peripheral, and absorption compartments,respectively, with κa being the first-order absorption rate and cl2 being the inter-compartmentclearance rate. The concentration of drug at the central and peripheral compartments arerespectively represented by C and C2; that is,

C =A

V, C2 =

A2

V2

with V and V2 respectively being the volume of distribution for the central and peripheralcompartments. Again, A(0) = 0, A2(0) = 0, and the dose enters into the system throughthe initial condition for variable Aa in each dosing interval. For example, if a single bolus isadministered at time zero with dose D, then Aa(0) = D.

All the structural model parameters are assumed to be log-normally distributed except forImax, which is assumed to be logit-normally distributed (that is, logit(Imax) is assumed tobe normally distributed) to ensure its value between 0 and 1. For convenience, the meaningand the distribution form of these parameters as well as the corresponding values used inthe simulation are listed in Table 2.5.

In the simulation, two treatment arms are considered: For Treatment Arm 1, a dose isadministered at time zero, and then 24 additional identical doses are administered with theinter-dose interval being seven time units; For Treatment Arm 2, a dose is administeredat time zero, and then 12 additional identical doses are administered with the inter-doseinterval being fourteen time units.

Page 33: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.3. A MODEL WITH TIME-VARYING CLEARANCE 33

Param Code Meaning Distribution Median value ω

V V

apparent volume of distri-bution for the central com-partment

log-normal 5 0.1

cl,basic baseCl

maximum clearance ratefrom the central compart-ment

log-normal 1 0.1

V2 V2

apparent volume of distri-bution for the peripheralcompartment

log-normal 3 0.1

cl2 Cl2inter-compartment clear-ance rate

log-normal 0.5 0.1

κa Ka first-order absorption rate log-normal 0.6 0.1

logit(Imax) logitImaxlogit of the maximum inhi-bition of the clearance

normal 1.5 0.1

T50 T50

the time at which inhibitionof the clearance is reducedby half of the maximum in-hibition

log-normal 2 0.1

γ Gam Hill coefficient log-normal 3 0.1

Table 2.5: Structural model parameters and their values used in the simulation for a two-compartment model with first-order absorption and time-varying clearance. Please note thatthe “Code” column lists the corresponding notations used in TS code blocks, and the samenotation is also used in NONMEM code but with all the characters in upper case. The “ω”column specifies the standard deviation for either the corresponding random variable (if it isassumed to be normally distributed) or the logarithm of the corresponding random variable(if it is assumed to be log-normally distributed).

2.3.1 Implementation in NONMEM

Because the clearance rate, cl, is a continuous function of time t, it has to be evaluated ateach iteration of ODE solver steps. A proper way to handle this in NONMEM is to put thisvariable inside the $DES block; that is,

$DES

; TIME -VARYING CLEARANCE

CL = BASECL * (1 - IMAX * T**GAM/(T**GAM + T50**GAM))

; CENTRAL COMPARTMENT

DADT (1) = KA * A(3) - CL*A(1)/V - CL2*(A(1)/V - A(2)/V2)

Page 34: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

34 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

; PERIPHERIAL COMPARTMENT

DADT (2) = CL2*(A(1)/V - A(2)/V2)

; ABSORPTION COMPARTMENT

DADT (3) = - KA * A(3)

Again, the dosing information is implicitly incorporated into the model without the need toexplicitly specify the initial condition for the dosing compartment, Aa. Specifically, in theinput dataset, one uses the CMT to specify the compartment to which the dose is administered(in this case, it is compartment 3), the AMT for the dose administered, and the ADDL for theadditional number of identical doses administered as well as II for the inter-dose interval(see the highlighted row in cyan color in Table 2.6). The complete NONMEM codes aregiven in Appendix 2.C.

CID TIME AMT CMT ADDL II DV

1 0.00 10 3 24 7 .

1 1.00 . . . . .

1 2.00 . . . . .

1 3.00 . . . . .

1 4.00 . . . . .

Table 2.6: A fragment of the input dataset for a two-compartment model with first-orderabsorption in a multiple-dosing-event case.

2.3.2 Implementation in Trial Simulator

Similarly, a proper way to implement this model in TS is to define the clearance rate as aprocedure variable and then specify its equation in the Procedure block equations. Beloware the key steps to implement this model.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog window to specify the inter-individual variability for the model parameters.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, baseCl, V2, Cl2, Ka, logitImax, T50, and Gam (see Table2.5 for their meanings).

– Add variable Imax, and check the “Derived” checkbox below the variablename, and then enter exp(logitImax)/(1 + exp(logitImax)) in the bluefield that appears.

Page 35: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.3. A MODEL WITH TIME-VARYING CLEARANCE 35

• In the Continuous tab, enter the information for V, baseCl, V2, Cl2, Ka, logitImax, T50, and Gam based on the information provided in Table 2.5.

2. Add a Procedure block to specify the system of ODEs (2.7) with clearance rate definedby (2.2).

• In the Procedure Variable tab, add procedure variable Cl (by clicking the “AddProcedure Variable” button, and then enter Cl in the box that appears).

• In the Integrator Variables tab, add integrator variables A, A2, and Aa (by clickingthe “Add Integrator Variable” button to add one variable at a time).

• In the Code tab, enter the following information:

– Integrator initialization per subject: enter 0 for each integrator variable.

– Equations: enter the following statement in the yellow-shaded field to specifythe clearance rate

Cl = baseCl * (1 - Imax * t**Gam /(t**Gam + T50**Gam))

– Differential equation(s): In the blue-shaded field for “A'=”, enter

Ka*Aa - Cl*A/V - Cl2 * (A/V - A2/V2)

In the blue-shaded field for “A2'=”, enter Cl2 * (A/V - A2/V2)

In the blue-shaded field for “Aa'=”, enter -Ka*Aa

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered.

Page 36: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

36 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

• Dose to: Choose Variable: Aa from the drop-down list.

4. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule.

Page 37: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.A. NONMEMCODES: A ONE-COMPARTMENTMODELWITHMICHAELIS-MENTEN ELIMINATION FORAN IV CASE37

2.A NONMEM Codes: A One-Compartment Model

with Michaelis-Menten Elimination for an IV Case

2.A.1 Uncorrelated Random Effects

$PROBLEM ONE COMPARTMENT MODEL WITH IV BOLUS AND MICHAELIS -

MENTEN ELIMINATION

$INPUT ID TIME AMT CMT DV

$DATA ONECPT_IVBOLUS_MMELIMINATION_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP=1

COMP = (CENTRAL)

; ============= STRUCTURE MODEL PARAMETERS ==================

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV*EXP(ETA (1))

; KM = HALF SATURATION CONSTANT

TVKM = THETA (2)

KM = TVKM*EXP(ETA(2))

; VMAX = MAXIMUM ELIMINATION RATE

TVVMAX = THETA (3)

VMAX = TVVMAX*EXP(ETA(3))

; =========== INITIAL VALUES FOR THETA AND OMEGA ==============

$THETA

5 ;TVV

1 ;TVKM

2 ;TVVMAX

$OMEGA

0.01 ;ETA V

0.01 ; ETA KM

0.01 ; ETA VMAX

Page 38: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

38 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

; ============== ODE model ====================================

$DES

DADT (1) = -VMAX*A(1)/(KM*V + A(1))

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

IPRED = A(1)/V

Y = IPRED *(1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_IV_MMELIM_INDRANEF_SIMOUT

$TABLE REPL ID TIME V KM VMAX ONEHEADER NOPRINT NOAPPEND

FIRSTONLY

FILE = ONECPT_IV_MMELIM_INDRANEF_POSTHOC

2.A.2 Correlated Random Effects

$PROBLEM ONE COMPARTMENT MODEL WITH IV BOLUS AND MICHAELIS -

MENTEN ELIMINATION

$INPUT ID TIME AMT CMT DV

$DATA ONECPT_IVBOLUS_MMELIMINATION_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP=1

COMP = (CENTRAL)

; =============== STRUCTURE MODEL PARAMETERS ================

Page 39: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.A. NONMEM: MICHAELIS-MENTEN MODEL FOR AN IV CASE 39

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV*EXP(ETA (1))

; KM = HALF SATURATION CONSTANT

TVKM = THETA (2)

KM = TVKM*EXP(ETA(2))

; VMAX = MAXIMUM ELIMINATION RATE

TVVMAX = THETA (3)

VMAX = TVVMAX*EXP(ETA(3))

; ============= INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

5 ;TVV

1 ;TVKM

2 ;TVVMAX

; FOR ETA V

$OMEGA

0.01

; FOR ETA_KM AND ETA_VMAX

$OMEGA BLOCK (2)

0.1

0.09 0.1

; ============== ODE model ====================================

$DES

DADT (1) = -VMAX*A(1)/(KM*V + A(1))

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

IPRED = A(1)/V

Y = IPRED *(1 + EPS(1))

Page 40: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

40 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_IV_MMELIM_CORRANEF_SIMOUT

$TABLE REPL ID TIME V KM VMAX ONEHEADER NOPRINT NOAPPEND

FIRSTONLY

FILE = ONECPT_IV_MMELIM_CORRANEF_POSTHOC

2.B NONMEM Codes: a One-Compartment Model

with Michaelis-Menten Elimination and First-order

Absorption

2.B.1 No Time Lag

$PROBLEM ONE COMPARTMENT MODEL WITH ORAL BOLUS AND MICHAELIS -

MENTEN ELIMINATION

$INPUT ID TIME AMT CMT DV

$DATA ONECPT_1STORDERABSORP_MMELIM_SINGLEBOLUS_SIMIN.csv IGNORE

=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP=2

COMP = (ABSORB)

COMP = (CENTRAL)

; =============== STRUCTURE MODEL PARAMETERS =================

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV*EXP(ETA (1))

; KM = HALF SATURATION CONSTANT

TVKM = THETA (2)

Page 41: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.B. NONMEM: MICHAELIS-MENTEN MODEL, FIRST-ORDER ABSORPTION 41

KM = TVKM*EXP(ETA(2))

; VMAX = MAXIMUM ELIMINATION RATE

TVVMAX = THETA (3)

VMAX = TVVMAX*EXP(ETA(3))

; KA = ABSORPTION RATE

TVKA = THETA (4)

KA = TVKA * EXP(ETA(4))

; ============= INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

5 ;TVV

1 ;TVKM

2 ;TVVMAX

0.6 ; TVKA

; PUTTING OMEGA VALUE TO BE ZERO TO DISABLE INTER -SUBJECT

VARIABILITY

; IN SUCH CASE , FIX HAS TO BE USED. OTHERWISE AN ERROR WILL BE

OCCURRED

$OMEGA

0.01 ;ETA V

0.01 ; ETA KM

0.01 ; ETA VMAX

0.01 ; ETA KA

; ============== ODE model ====================================

$DES

DADT (1) = - KA * A(1)

DADT (2) = KA * A(1) - VMAX*A(2)/(KM*V + A(2))

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

; PUTTING SIGMA VALUE TO BE ZERO TO DISABLE RESIDUAL ERROR

VARIABILITY

; IN SUCH CASE , FIX HAS TO BE USED. OTHERWISE AN ERROR WILL BE

OCCURRED

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

IPRED = A(2)/V

Page 42: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

42 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

Y = IPRED *(1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_1STORDERABSORPNOTLAG_MMELIM_SIMOUT

$TABLE REPL ID TIME V KM VMAX KA ONEHEADER NOPRINT NOAPPEND

FIRSTONLY

FILE = ONECPT_1STORDERABSORPNOTLAG_MMELIM_POSTHOC

2.B.2 Time Lag

$PROBLEM ONE -CPT MODEL WITH 1ST-ORDER ABSORPTION AND TLAG AND

MICHAELIS -MENTEN ELIMINATION

$INPUT ID TIME AMT CMT DV

$DATA ONECPT_1STORDERABSORP_MMELIM_SINGLEBOLUS_SIMIN.csv IGNORE

=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP=2

COMP = (ABSORB)

COMP = (CENTRAL)

; =============== STRUCTURE MODEL PARAMETERS ===============

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV*EXP(ETA (1))

; KM = HALF SATURATION CONSTANT

TVKM = THETA (2)

KM = TVKM*EXP(ETA(2))

; VMAX = MAXIMUM ELIMINATION RATE

TVVMAX = THETA (3)

VMAX = TVVMAX*EXP(ETA(3))

Page 43: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.B. NONMEM: MICHAELIS-MENTEN MODEL, FIRST-ORDER ABSORPTION 43

; KA = ABSORPTION RATE

TVKA = THETA (4)

KA = TVKA * EXP(ETA(4))

; TIME LAG (TLAG)

TVTLAG = THETA (5)

ALAG1 = TVTLAG * EXP(ETA (5))

; ============= INITIAL VALUES FOR THETA AND OMEGA ============

$THETA

5 ;TVV

1 ;TVKM

2 ;TVVMAX

0.6 ; TVKA

0.5 ; TVTLAG

; PUTTING OMEGA VALUE TO BE ZERO TO DISABLE INTER -SUBJECT

VARIABILITY

; IN SUCH CASE , FIX HAS TO BE USED. OTHERWISE AN ERROR WILL BE

OCCURRED

$OMEGA

0.01 ;ETA V

0.01 ; ETA KM

0.01 ; ETA VMAX

0.01 ; ETA KA

0.01 ; ETA TLAG

; ============== ODE model ====================================

$DES

DADT (1) = - KA * A(1)

DADT (2) = KA * A(1) - VMAX*A(2)/(KM*V + A(2))

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

; PUTTING SIGMA VALUE TO BE ZERO TO DISABLE RESIDUAL ERROR

VARIABILITY

; IN SUCH CASE , FIX HAS TO BE USED. OTHERWISE AN ERROR WILL BE

OCCURRED

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

Page 44: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

44 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

IPRED = A(2)/V

Y = IPRED *(1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_1STORDERABSORPTLAG_MMELIM_SIMOUT

$TABLE REPL ID TIME V KM VMAX KA ALAG1 ONEHEADER NOPRINT

NOAPPEND FIRSTONLY

FILE = ONECPT_1STORDERABSORPTLAG_MMELIM_POSTHOC

2.C NONMEM Codes: A Two-Compartment Model

with Continuously Time-Varying Clearance

$PROBLEM TWO -CPT MODEL WITH 1ST-ORDER ABSORPTION AND TIME -

VARYING CL

; ========= INPUT DATASET ===================================

$INPUT ID TIME AMT CMT ADDL II DV

$DATA TWOCPT_1STORDERABSORP_MULTIPLEBOLUS_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP = 3

COMP = (CENTRAL)

COMP = (PERIPH)

COMP = (ABSORP)

; =============== STRUCTURE MODEL PARAMETERS ===================

$PK

; V = VOLUME OF DISTRIBUTION OF CENTRAL COMPARTMENT

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; BASECL = BASE CLEARANCE RATE FOR THE CENTRAL COMPARTMENT

TVCL = THETA (2)

Page 45: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

2.C. NONMEM: A MODEL WITH TIME-VARYING CLEARANCE 45

BASECL = TVCL * EXP(ETA(2))

; V2 = VOLUM OF DISTRIBUTION OF PERIPHERIAL COMPARTMENT

TVV2 = THETA (3)

V2 = TVV2 * EXP(ETA(3))

; CL2 = INTERCOMPARTMENTAL CLEARANCE

TVCL2 = THETA (4)

CL2 = TVCL2 * EXP(ETA(4))

; KA = ABSORPTION RATE

TVKA = THETA (5)

KA = TVKA * EXP(ETA(5))

; PARAMETERS IN TIME -VARYING CLEARANCE FUNCTION (

PARAMETERIZATION IN IMAX MODEL)

TVLOGITIMAX = THETA (6)

LOGITIMAX = TVLOGITIMAX + ETA(6)

IMAX = EXP(LOGITIMAX)/(1 + EXP(LOGITIMAX))

TVT50 = THETA (7)

T50 = TVT50 * EXP(ETA(7))

TVGAM = THETA (8)

GAM = TVGAM * EXP(ETA(8))

; ============ INITIAL VALUES FOR THETA AND OMEGA ============

$THETA

5 ; TVV

1 ; TVCL

3 ; TVV2

0.5 ; TVCL2

0.6 ; TVKA

1.5 ; TVLOGITIMAX

2 ; TVT50

3 ; TVGAM

$OMEGA

0.01

0.01

0.01

0.01

0.01

0.01

Page 46: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

46 CHAPTER 2. MODELS WITH NON-CONSTANT CLEARANCE

0.01

0.01

; ======================= ODE MODEL ==========================

$DES

; TIME -VARYING CLEARANCE

CL = BASECL * (1 - IMAX * T**GAM/(T**GAM + T50**GAM))

; CENTRAL COMPARTMENT

DADT (1) = KA * A(3) - CL*A(1)/V - CL2*(A(1)/V - A(2)/V2)

; PERIPHERIAL COMPARTMENT

DADT (2) = CL2*(A(1)/V - A(2)/V2)

; ABSORPTION COMPARTMENT

DADT (3) = - KA * A(3)

; ===================== RESIDUAL ERROR MODEL ===============

; INITIAL ESTIMATES FOR THE VARIANCE MATRIX (SIGMA) OF THE

RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

IPRED = A(1)/V

Y = IPRED *(1 + EPS(1))

; REPLICATE NUMBER

REPL = IREP

; =================== RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = TWOCPT_1STORDERABSORP_TIMEVARYINGCL_SIMOUT

$TABLE REPL ID TIME V V2 CL2 KA IMAX T50 GAM ONEHEADER NOPRINT

NOAPPEND FIRSTONLY

FILE = TWOCPT_1STORDERABSORP_TIMEVARYINGCL_POSTHOC

Page 47: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

Chapter 3

Target-Mediated Drug DispositionModels

3.1 Introduction

Target-mediated drug disposition (TMDD) occurs when there is a significant proportion ofthe ligand/drug that binds to the receptor/target such that this binding has a non-negligibleeffect on the pharmacokinetic profiles of the drug (see [4, 5] for more information). A keycharacteristic of TMDD is that the apparent pharmacokinetic parameters (e.g., the volumeof distribution and the total systemic clearance) may have a dose-dependent behavior.

Even though the concept of TMDD was initially developed based on the saturable bindingbehavior of small molecule compounds (e.g., warfarin), it is more widely recognized in theliterature as a saturable clearance mechanism for biologics (e.g., monoclonal antibodies,cytokines, and growth factors) due to their highly specific and strong binding to the targetas well as the finite number of targets on the cell surface. The general features of TMDD insmall-molecule compounds as well as its difference from the large-molecule compounds canbe found in [6].

Recall that the Michaelis-Menten model has also been frequently used to describe the sat-urable clearance mechanism of the drug. However, it does not account for the turnover (up-or down-regulation) of the capacity term, and hence does not have some features exhibitedby the TMDD model. Interested readers are referred to [7, 8] for more information on therelationship between these two types of models.

47

Page 48: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

48 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

3.1.1 Basic Target-Mediated Drug Disposition Models

The TMDD models proposed in [9] are the basic ones, including compartments for con-centrations of free receptor (R), free ligand (C), and ligand-receptor complex (RC) at thecentral compartment with optional compartment (Ap) for the amount of free ligand in theperipheral compartment. Figure 3.1 is for the schematic representation of a basic TMDDmodel with two compartments: the free ligand in the central compartment (C, in termsof concentration with V being the volume of distribution) can distribute to a peripheralcompartment (Ap, in terms of amount), be eliminated from the system, or bind to the freereceptor (R) to form a ligand-receptor complex (RC), which may then either dissociate orbe internalized/degraded. The corresponding system of ordinary differential equations aregiven as follows: (on next page)

C

Ap

+ R RC

Input(t)

V

κel

κcp

κpc

κsyn

κdeg

κon

κoff

κint

Figure 3.1: Schematic representation of a basic TMDD model with two compartments.Here Input(t) denotes the input rate (amount per unit of time) of the ligand into the centralcompartment at time t due to the administration of the ligand, V is the volume of distributionfor the central compartment, κcp represents the first-order transition rate from the centralcompartment to the peripheral compartment, and κpc is the first-order transition rate fromthe peripheral compartment to the central compartment. Parameter κsyn denotes the zero-order synthesis rate for the free receptor, κdeg is the first-order degradation rate for thefree receptor, κon represents the binding rate of the free ligand to the free receptor, κoff

denotes the dissociation rate of the ligand-receptor complex, and κint represents the first-order internalization rate for the ligand-receptor complex.

Page 49: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.1. INTRODUCTION 49

C(t) =Input(t)

V− κelC(t)− κonR(t)C(t) + κoffRC(t)− κcpC(t) + κpc

Ap(t)

V, (3.1a)

Ap(t) = κcpV C(t)− κpcAp(t), (3.1b)

R(t) = κsyn − κdegR(t)− κonR(t)C(t) + κoffRC(t), (3.1c)

RC(t) = κonR(t)C(t)− κoffRC(t)− κintRC(t), (3.1d)

C(0) = 0, Ap(0) = 0, R(0) = R0, RC(0) = 0 (3.1e)

with R0 set to be

R0 =κsyn

κdeg

. (3.2)

Here Input(t) denotes the input rate (amount per unit of time) of the ligand into the centralcompartment at time t due to the administration of the ligand, V is the volume of distributionfor the central compartment, κcp represents the first-order transition rate from the centralcompartment to the peripheral compartment, and κpc is the first-order transition rate fromthe peripheral compartment to the central compartment. Parameter κsyn denotes the zero-order synthesis rate for the free receptor, κdeg is the first-order degradation rate for the freereceptor, κon represents the binding rate of the free ligand to the free receptor, κoff denotes thedissociation rate of ligand-receptor complex, and κint represents the first-order internalizationrate for the ligand-receptor complex.

The TMDD models may exhibit complex dynamics. For example, if the initial concentrationof the ligand is greater than that of receptor, the plasma concentration-time profile of theligand may exhibit four distinguished phases in the elimination stage, as shown in the blueand green curves in Figure 3.2. The detailed mathematical analysis of such models can befound in [7].

10−4

10−2

100

102

0 250 500 750 1000 1250Time

Con

cent

ratio

n of

free

liga

nd

DoseAMT

100

500

1000

Figure 3.2: Plasma concentration-time profile of a one-compartment TMDD model for anIV bolus case with different doses administered.

Page 50: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

50 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

The fundamental assumption made in these basic models is that there is only one ligand andone receptor involved in binding that occurs only in the central compartment, and that thereceptor and complex do not diffuse to the peripheral compartment. Interested readers arereferred to [10, 11] and the reference therein on the different extensions of such models.

3.1.2 Approximations of Target-Mediated Drug Disposition Mod-els

It was noticed that TMDD model parameters may be difficult to identify, especially witha relatively sparse PK data set. One potential reason is that the binding and dissociationprocesses are often much faster than the other ones so that κon and κoff becomes difficult,if not impossible, to identify. To allievate this difficulty, two approximation methods havebeen proposed in the literature. One is quasi-equilibrium (QE) approximation [12], and theother is quasi-steady-state (QSS) approximation [13].

Quasi-equilibrium approximation. For this method, it is assumed that binding anddissociation processes are much faster than the other ones such that the binding of ligandand receptor and dissociation of the complex reaches an equilibrium:

κonR · C ≡ κoffRC. (3.3)

With this assumption, parameters κon and κoff can be replaced by a single parameter κD,

κD =κoff

κon

, (3.4)

which is often called the equilibrium dissociation rate.

The new system of ODEs is in terms of the total (free and bound) ligand concentration(Ctot) and the total receptor concentration (Rtot) with C described by the following algebraicequations

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

], (3.5)

and RC expressed in terms of Ctot and C

RC = Ctot − C, (3.6)

or equivalently in terms of Rtot and C

RC =RtotC

κD + C. (3.7)

Specifically, the system of ODEs for the quasi-equilibrium-target-mediated drug disposition

Page 51: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.1. INTRODUCTION 51

(QE-TMDD) model with one compartment is given by

Ctot(t) =Input(t)

V− κintCtot(t)− (κel − κint)C(t), (3.8a)

Rtot(t) = κsyn − κdegRtot(t)− (κint − κdeg)(Ctot(t)− C(t)), (3.8b)

Ctot(0) = 0, Rtot(0) = R0 (3.8c)

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

]. (3.8d)

The QE-TMDD model with two compartments is given as follows:

Ctot(t) =Input(t)

V− κintCtot(t)− (κel − κint)C(t)− κcpC(t) + κpc

Ap(t)

V, (3.9a)

Ap(t) = κcpV C(t)− κpcAp(t), (3.9b)

Rtot(t) = κsyn − κdegRtot(t)− (κint − κdeg)(Ctot(t)− C(t)), (3.9c)

Ctot(0) = 0, Ap(0) = 0, Rtot(0) =κsyn

κdeg

(3.9d)

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

]. (3.9e)

Equation (3.8b) (or (3.9c)) implies that if the internalization rate of the complex is assumedto be the same as the degeneration rate of the free target (that is, κint = κdeg), then the lastterm in the right-hand side of (3.8b) (or (3.9c)) is zero. Note that

R0 =κsyn

κdeg

.

Hence, the total target concentration Rtot is a constant with

Rtot ≡ R0.

Thus, in such a case, (3.8) reduces to

Ctot(t) =Input(t)

V− κintCtot(t)− (κel − κint)C(t), (3.10a)

Ctot(0) = 0 (3.10b)

Page 52: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

52 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

], (3.10c)

and Rtot ≡ R0. And (3.9) reduces to

Ctot(t) =Input(t)

V− κintCtot(t)− (κel − κint)C(t)− κcpC(t) + κpc

Ap(t)

V, (3.11a)

Ap(t) = κcpV C(t)− κpcAp(t), (3.11b)

Ctot(0) = 0, Ap(0) = 0 (3.11c)

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

], (3.11d)

and Rtot ≡ R0. This kind of model is sometimes called a Wagner model .

Quasi-steady-state approximation. This method assumes that the binding is balancedby the sum of the dissociation and internalization

κonR · C ≡ (κoff + κint)RC. (3.12)

This method is useful for the case where the internalization rate of the complex is non-negligible compared to the dissociation rate such that the assumption made in the quasi-equilibrium approximation does not hold. It is worth noting that the QSS-TMDD modelhas exactly the same form as the QE-TMDD model except that κD in (3.5) is replaced byκSS

κSS =κoff + κint

κon

. (3.13)

Hence, all the demonstrated examples are based on QE approximation of basic models.

3.1.3 Notations and Parameter Values Used in the Simulation

To implement the TMDD models in different scenarios either in NONMEM or TS, one mayneed to rewrite the models in a different form. For example, in an IV case, one may findit is more convenient to express the ligand at the central compartment in terms of amountinstead of concentration. In addition, for the oral case, one may need to introduce extracompartments to describe the absorption so that the dosing information can be automaticallyincorporated into the system. Let’s say that the absorption is assumed to be first-order. Thenan absorption compartment, Aa, is added

Aa = −κaAa (3.14)

Page 53: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.1. INTRODUCTION 53

withInput = κaAa,

where κa denotes the first-order absorption rate. Hence, for the convenience of readers, allthe possible model state variables in the QE-TMDD models considered are summarized inTable 3.1.

Variable Code Meaning

C C concentration of free ligand at the central compartment

Ap Ap amount of free ligand at the peripheral compartment

Aa Aa amount of ligand at the absorption compartment

Atot Atot amount of total (free and bound) ligand at the central compartment

Ctot Ctotconcentration of total (free and bound) ligand at the central compart-ment

Rtot Rtotconcentration of total (free and bound) receptor at the central com-partment

Table 3.1: Model state variables in QE-TMDD models. Please note that the “Code” columnlists the corresponding notations used in TS code blocks, and the same notation is also usedin NONMEM code but with all the characters in upper case.

For the TMDD models, the initial concentration of free receptor, R0, is set to be the ratioof its synthesis rate (κsyn) to its degradation rate (κdeg). Hence, these three parameters canbe parameterized either in terms of R0 and κsyn or in terms of R0 and κdeg or in terms ofκsyn and κdeg. For all the examples demonstrated, they are parameterized in terms of R0 andκsyn. Again, for convenience, all the possible model parameters in the QE-TMDD modelsconsidered are summarized in Table 3.2 as well as their distributions and values used in thesimulation.

Page 54: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

54 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

Parameter Code Meaning Distribution Median value ω

κD KDequilibrium dissociationrate

constant 0.00076

V Vvolume of distribution forthe central compartment

log-normal 0.9 0.1

κel Kelfirst-order elimination ratefor the free ligand

log-normal 0.0019 0.1

κint Kint

first-order internalization(degradation) rate for theligand-receptor complex

constant 0.0007

κcp Kcp

first-order transition ratefrom the central compart-ment to the peripheral com-partment

log-normal 0.03 0.1

κpc Kpc

first-order transition ratefrom the peripheral com-partment to the centralcompartment

log-normal 0.0087 0.1

κa Ka first-order absorption rate log-normal 0.2 0.1

R0

R0

initial concentration of freereceptor at the central com-partment constant 400

Rtot

concentration of total re-ceptor at the central com-partment (for Wagner mod-els)

κsyn Ksynzero-order synthesis rate forthe free receptor

constant 0.22

Table 3.2: Structural model parameters and their values used in the simulation for QE-TMDD models. Please note that the “Code” column lists the corresponding notations usedin TS code blocks, and the same notation is also used in NONMEM code but with all thecharacters in upper case except for parameter R0, which is denoted as R_0 in NONMEMcodes. The “ω” column specifies the standard deviation of the logarithm of the correspondingrandom variables.

Page 55: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.2. A ONE-COMPARTMENT QE-TMDD MODEL FOR AN IV CASE 55

3.2 A Quasi-Equilibrium-Target-Mediated Drug Dis-

position Model with One Compartment for an IV

Case

As discussed previously, to implement the QE-TMDD model (3.8) for an IV case in eitherNONMEM or TS, it is convenient to express the total ligand in terms of amount instead ofconcentration. That is, (3.8) is rewritten as

Atot(t) = −κintAtot(t)− (κel − κint)V C(t), (3.15a)

Rtot(t) = κsyn − κdegRtot(t)− (κint − κdeg)(Ctot(t)− C(t)), (3.15b)

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

](3.15c)

and

Ctot =Atot

V. (3.15d)

Here Rtot(0) = R0. The dose enters into the system through the initial condition for Atot.For example, if a single IV bolus is administered with dose D at time 0, then Atot(0) = D.

3.2.1 Implementation in NONMEM

For this model, the initial condition for Rtot is nonzero. Because Rtot is not a dosing com-partment (that is, the compartment to which the dose is administered), one has to explicitlydefine it. In NONMEM, one can achieve this through the reserved variable A_0 in the $PK

block. Specifically, system (3.15) is specified through the $DES block as follows:

$DES

; TOTAL DRUG CONCENTRATION

CTOT = A(1)/V

; TOTAL RECEPTOR CONCENTRATION

RTOT = A(2)

; FREE DRUG CONCENTRATION

C = 1/2*(( CTOT - RTOT - KD) + SQRT((CTOT - RTOT - KD)**2 + 4

* KD * CTOT))

; TOTAL DRUG AMOUNT AT CENTRAL COMPARTMENT

DADT (1) = - KINT * A(1) - (KEL - KINT) * C * V

Page 56: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

56 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

; TOTAL RECEPTOR CONCENTRATION AT CENTRAL COMPARTMENT

DADT (2) = KSYN - KDEG * A(2) - (KINT - KDEG) * (CTOT - C)

and the initial condition for Rtot is specified in the $PK block as follows: (see Appendix 3.Afor the complete NONMEM codes)

$PK

; INITIAL CONDITION FOR TOTAL RECEPTOR

A_0 (2) = R_0

Again, the dosing information is implicitly incorporated into the model through the inputdataset without the need to explicitly specify the initial condition for the dosing compartment(see the highlighted row in Table 3.3).

CID TIME AMT CMT DV

1 0.00 100 1 .

1 1.00 . . .

1 2.00 . . .

1 3.00 . . .

Table 3.3: A fragment of the input dataset for a QE-TMDD model with one compartment,where a single IV bolus is administered at time 0 with dose D = 100.

3.2.2 Implementation in Trial Simulator

Note that Ctot and C have to be evaluated at every iteration of the ODE solver step. Hence,these variables should be defined as procedure variables. Please note that, for calculationsthat are made at every iteration of the ODE step, things can get much more complicated. Itis advisable to consolidate as many statements as possible into one Procedure block as theorder of execution is guaranteed within a Procedure block.

As we saw earlier, if the differential equations are specified through the Procedure block,then initial conditions for the state variables can be explicitly specified through the property“Integrator initialization per subject” in the property dialog box. Below are the key stepsto implement this model in TS, where Step 3 is used to specify the system of ODEs (3.15)as well as its initial conditions.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to specify the inter-individual variability for the model parameters:

Page 57: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.2. A ONE-COMPARTMENT QE-TMDD MODEL FOR AN IV CASE 57

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Kel, R0, KD, Kint, and Ksyn (see Table 3.2 for their mean-ings).

– Add variable Kdeg, and check the “Derived” checkbox below the variablename, and then enter Ksyn/R0 in the blue field that appears.

• In the Continuous tab, enter the information for V, Kel, R0, KD, Kint, and Ksyn

based on the information provided in Table 3.2.

2. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (3.15) as well as its initial conditions.

• In the Procedure Variable tab, add procedure variables Ctot and C.

• In the Integrator Variables tab, add integrator variables Atot and Rtot.

• In the Code tab, enter the following information.

– Integrator initialization per subject:In the blue-shaded field for “Atot(0)=”, enter 0In the blue-shaded field for “Rtot(0)=”, enter R0

– Equations: enter the following statements in the yellow-shaded field

Ctot = Atot/V;

C = 1/2 * ((Ctot - Rtot - KD) + sqrt(abs((Ctot -

Rtot - KD))**2 + 4 * KD * Ctot))

– Differential equation(s): In the blue-shaded field for “Atot'=”, enter

-Kint * Atot - (Kel - Kint)* C * V

In the blue-shaded field for “Rtot'=”, enter

Ksyn - Kdeg * Rtot - (Kint - Kdeg)* (Ctot - C)

Page 58: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

58 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered:

• Dose to: Choose Variable: Atot from the drop-down list.

4. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule.

Again, the reason for setting the initial condition of the dosing compartment Atot to be zeroor leaving it empty in the blue-shaded field for “Integrator initialization per subject” (Codetab of the Procedure block) is that the dosing information is implicitly incorporated into themodel through the Formulation block, Test_Drug, as well as the Treatments page (see thelast two steps).

3.3 A Quasi-Equilibrium-Target-Mediated Drug Dis-

position Model with Two Compartments for an IV

Case

Here we still consider a QE-TMDD model for an IV case but with two compartments. Again,to implement it in NONMEM or TS, the total ligand at the central compartment is expressedin terms of amount; that is, (3.9) is rewritten as

Atot(t) = −κintAtot(t)− (κel − κint)V C(t)− κcpV C(t) + κpcAp(t), (3.16a)

Ap(t) = κcpV C(t)− κpcAp(t), (3.16b)

Rtot(t) = κsyn − κdegRtot(t)− (κint − κdeg)(Ctot(t)− C(t)), (3.16c)

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

], (3.16d)

and

Ctot =Atot

V. (3.16e)

Here Ap(0) = 0, and Rtot(0) = R0. The dose enters into the system through the initialcondition for Atot. For example, in the case where a single IV bolus is administered at time0 with dose D, then Atot(0) = D.

This model can be implemented in NONMEM in the same way as the model with onecompartment. The complete NONMEM codes are given in Appendix 3.B.

Page 59: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.3. A TWO-COMPARTMENT QE-TMDD MODEL FOR AN IV CASE 59

Implementation in TS. This model can also be implemented in TS in the same way asthe one with one compartment. Below are the key steps to implement it.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to specify the inter-individual variability for the model parameters:

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Kel, R0, KD, Kint, Kcp, Kpc, and Ksyn (see Table 3.2 fortheir meanings).

– Add variable Kdeg, and check the “Derived” checkbox below the variablename, and then enter Ksyn/R0 in the blue field that appears.

• In the Continuous tab, enter the information for V, Kel, R0, KD, Kint, Kcp, Kpc,and Ksyn based on the information provided in Table 3.2.

2. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (3.16).

• In the Procedure Variable tab, add procedure variables Ctot and C.

• In the Integrator Variables tab, add integrator variables Atot, Ap, and Rtot.

• In the Code tab, enter the following information:

– Integrator initialization per subject:In the blue-shaded field for “Atot(0)=”, enter 0In the blue-shaded field for “Ap(0)=”, enter 0In the blue-shaded field for “Rtot(0)=”, enter R0

– Equations: enter the following statements in the yellow-shaded field

Ctot = Atot/V;

C = 1/2 * ((Ctot - Rtot - KD) + sqrt(abs((Ctot -

Rtot - KD))**2 + 4 * KD * Ctot))

– Differential equation(s): In the blue-shaded field for “Atot'=”, enter

-Kint * Atot - (Kel - Kint)* C * V - Kcp * C * V + Kpc * Ap

In the blue-shaded field for “Ap'=”, enter

Kcp * C * V - Kpc * Ap

In the blue-shaded field for “Rtot'=”, enter

Ksyn - Kdeg * Rtot - (Kint - Kdeg)* (Ctot - C)

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered.

• Dose to: choose Variable: Atot from the drop-down list.

4. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule.

Page 60: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

60 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

3.4 A Quasi-Equilibrium-Target-Mediated Drug Dis-

position Model with One Compartment and First-

order Absorption

To implement the QE-TMDD model (3.8) for the oral bolus case where the absorption isassumed to be first-order, it is more convenient to have an absorption compartment to let thesoftware automatically incorporate the dosing information into the system. That is, (3.8) isrewritten as follows:

Aa(t) = −κaAa(t), (3.17a)

Ctot(t) =κaAa(t)

V− κintCtot(t)− (κel − κint)C(t), (3.17b)

Rtot(t) = κsyn − κdegRtot(t)− (κint − κdeg)(Ctot(t)− C(t)), (3.17c)

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

]. (3.17d)

Here Ctot(0) = 0 and Rtot(0) = R0. The dose enters into the system through the initialcondition for Aa. For example, if a single oral bolus is administered at time 0 with dose D,then Aa(0) = D.

Again, the technique used to implement this model in NONMEM is same as for the QE-TMDD models for an IV case (see Appendix 3.C for the codes).

Implementation in TS. Below are the key steps to implement this model in TS.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to specify the inter-individual variability for the model parameters.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Kel, R0, KD, Kint, Ka, and Ksyn (see Table 3.2 for theirmeanings).

– Add variable Kdeg, and check the “Derived” checkbox below the variablename, and then enter Ksyn/R0 in the blue field that appears.

• In the Continuous tab, enter the information for V, Kel, R0, KD, Kint, Ka, andKsyn based on the information provided in Table 3.2.

2. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (3.17).

Page 61: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.5. TWO-COMPARTMENT QE-TMDD, FIRST-ORDER ABSORPTION 61

• In the Procedure Variable tab, add procedure variable C.

• In the Integrator Variables tab, add integrator variables Ctot, Aa, and Rtot.

• In the Code tab, enter the following information:

– Integrator initialization per subject:In the blue-shaded field for “Ctot(0)=”, enter 0In the blue-shaded field for “Aa(0)=”, enter 0In the blue-shaded field for “Rtot(0)=”, enter R0

– Equations: enter the following statements in the yellow-shaded field

C = 1/2 * ((Ctot - Rtot - KD) + sqrt(abs((Ctot -

Rtot - KD))**2 + 4 * KD * Ctot))

– Differential equation(s): In the blue-shaded field for “Ctot'=”, enter

Ka * Aa/V - Kint * Ctot - (Kel - Kint)* C

In the blue-shaded field for “Aa'=”, enter

-Ka * Aa

In the blue-shaded field for “Rtot'=”, enter

Ksyn - Kdeg * Rtot - (Kint - KDeg)* (Ctot - C)

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered.

• Dose to: choose Variable: Aa from the drop-down list.

4. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule.

3.5 A Quasi-Equilibrium-Target-Mediated Drug Dis-

position Model with Two Compartments and First-

order Absorption

Here we consider a QE-TMDD model with two compartments for an oral bolus case withabsorption assumed to be first-order. In such a case, we rewrite (3.9) as follows:

Aa(t) = −κaAa(t), (3.18a)

Ctot(t) =κaAa(t)

V− κintCtot(t)− (κel − κint)C(t)− κcpC(t) + κpc

Ap(t)

V, (3.18b)

Ap(t) = κcpV C(t)− κpcAp(t), (3.18c)

Rtot(t) = κsyn − κdegRtot(t)− (κint − κdeg)(Ctot(t)− C(t)) (3.18d)

Page 62: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

62 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

]. (3.18e)

Here Ctot(0) = 0, Ap(0) = 0, and Rtot(0) = R0. The dose enters into the system through theinitial condition for Aa. For example, if a single oral bolus is administered at time 0 withdose D, then Aa(0) = D.

NONMEM codes for this model are given in Appendix 3.D.

Implementation in TS. Below are the key steps to implement this model in TS.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to specify the inter-individual variability for the model parameters.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Kel, R0, KD, Kint, Ka, Kcp, Kpc, and Ksyn (see Table 3.2 fortheir meanings).

– Add variable Kdeg, and check the “Derived” checkbox below the variablename, and then enter Ksyn/R0 in the blue field that appears.

• In the Continuous tab, enter the information for V, Kel, R0, KD, Kint, Ka, Kcp,Kpc, and Ksyn based on the information provided in Table 3.2.

2. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (3.18).

• In the Procedure Variable tab, add procedure variable C.

• In the Integrator Variables tab, add integrator variables Ctot, Aa, Ap, and Rtot.

• In the Code tab, enter the following information.

– Integrator initialization per subject:In the blue-shaded field for “Ctot(0)=”, enter 0In the blue-shaded field for “Aa(0)=”, enter 0In the blue-shaded field for “Ap(0)=”, enter 0In the blue-shaded field for “Rtot(0)=”, enter R0

– Equations: enter the following statements in the yellow-shaded field

C = 1/2 * ((Ctot - Rtot - KD) + sqrt(abs((Ctot -

Rtot - KD))**2 + 4 * KD * Ctot))

– Differential equation(s): In the blue-shaded field for “Ctot'=”, enter

Ka * Aa/V - Kint * Ctot - (Kel - Kint) * C - Kcp * C

+ Kpc * Ap/V

Page 63: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.6. WAGNER MODEL WITH ONE COMPARTMENT FOR AN IV CASE 63

In the blue-shaded field for “Aa'=”, enter

-Ka * Aa

In the blue-shaded field for “Ap'=”, enter

Kcp * C * V - Kpc * Ap

In the blue-shaded field for “Rtot'=”, enter

Ksyn - Kdeg * Rtot - (Kint - KDeg)* (Ctot - C)

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered.

• Dose to: choose Variable: Aa from the drop-down list.

4. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule.

3.6 Wagner Model with One Compartment for an IV

Case

In this section, we start considering Wagner models (i.e., QE-TMDD models with Rtot beingconstant) in different scenarios. The first one is a Wagner model with one compartment,(3.10), for an IV case. Again, to implement it in NONMEM or TS, the total ligand at thecentral compartment is expressed in terms of amount; that is, (3.10) is rewritten as

Atot(t) = −κintAtot(t)− (κel − κint)V C(t) (3.19a)

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

], (3.19b)

and Ctot and Rtot respectively given by

Ctot =Atot

V, Rtot ≡ R0. (3.19c)

The dose enters into the system through the initial condition for Atot. For example, if asingle IV bolus is administered at time 0 with dose D, then Atot(0) = D.

NONMEM codes for this model are given in Appendix 3.E.

Implementation in TS. Below are the key steps to implement this model in TS.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to specify the inter-individual variability for the model parameters.

Page 64: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

64 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Kel, Rtot, KD, and Kint (see Table 3.2 for their meanings).

• In the Continuous tab, enter the information for V, Kel, Rtot, KD, and Kint basedon the information provided in Table 3.2.

2. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (3.19).

• In the Procedure Variable tab, add procedure variables Ctot and C.

• In the Integrator Variables tab, add integrator variable Atot.

• In the Code tab, enter the following information.

– Integrator initialization per subject:In the blue-shaded field for “Atot(0)=”, enter 0

– Equations: enter the following statements in the yellow-shaded field

Ctot = Atot/V;

C = 1/2 * ((Ctot - Rtot - KD) + sqrt(abs((Ctot -

Rtot - KD))**2 + 4 * KD * Ctot))

– Differential equation(s): In the blue-shaded field for “Atot'=”, enter

-Kint * Atot - (Kel - Kint)* C * V

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered.

• Dose to: choose Variable: Atot from the drop-down list.

4. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedules.

3.7 Wagner Model with Two Compartments for an IV

Case

Here we consider a Wagner model for an IV case but with two compartments. In such acase, (3.11) is rewritten as follows:

Atot(t) = −κintAtot(t)− (κel − κint)V C(t)− κcpV C(t) + κpcAp(t), (3.20a)

Ap(t) = κcpV C(t)− κpcAp(t) (3.20b)

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

], (3.20c)

Page 65: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.7. WAGNER MODEL WITH TWO COMPARTMENTS FOR AN IV CASE 65

and Ctot and Rtot respectively given by

Ctot =Atot

V, Rtot ≡ R0. (3.20d)

Here Ap(0) = 0. The dose enters into the system through the initial condition for Atot. Forexample, if a single IV bolus is administered at time 0 with dose D, then Atot(0) = D.

NONMEM codes for this model are given in Appendix 3.F.

Implementation in TS. Below are the key steps to implement this model in TS.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to specify the inter-individual variability for the model parameters.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Kel, Rtot, KD, Kint, Kcp, and Kpc (see Table 3.2 for theirmeanings).

• In the Continuous tab, enter the information for V, Kel, Rtot, KD, Kint, Kcp, andKpc based on the information provided in Table 3.2.

2. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (3.20).

• In the Procedure Variable tab, add procedure variables Ctot and C.

• In the Integrator Variables tab, add integrator variables Atot and Ap.

• In the Code tab, enter the following information.

– Integrator initialization per subject:In the blue-shaded field for “Atot(0)=”, enter 0In the blue-shaded field for “Ap(0)=”, enter 0

– Equations: enter the following statements in the yellow-shaded field

Ctot = Atot/V;

C = 1/2 * ((Ctot - Rtot - KD) + sqrt(abs((Ctot -

Rtot - KD))**2 + 4 * KD * Ctot))

– Differential equation(s): In the blue-shaded field for “Atot'=”, enter

-Kint * Atot - (Kel - Kint)* C * V - Kcp * C * V + Kpc * Ap

In the blue-shaded field for “Ap'=”, enter

Kcp * C * V - Kpc * Ap

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered.

Page 66: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

66 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

• Dose to: choose Variable: Atot from the drop-down list.

4. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule.

3.8 Wagner Model with One Compartment and First-

order Absorption

Again, to implement the Wagner model (3.10) for the oral bolus case where the absorptionis assumed to be first-order, we introduce an absorption compartment to have the softwareautomatically incorporate the dosing information into the system. That is, (3.10) is rewrittenas follows:

Aa(t) = −κaAa(t), (3.21a)

Ctot(t) =κaAa(t)

V− κintCtot(t)− (κel − κint)C(t) (3.21b)

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

], (3.21c)

and Rtot given by

Rtot ≡ R0. (3.21d)

Here Ctot(0) = 0. The dose enters into the system through the initial condition for Aa. Forexample, if a single oral bolus is administered at time 0 with dose D, then Aa(0) = D.

NONMEM codes for this model are given in Appendix 3.G.

Implementation in TS. Below are the key steps to implement this model in TS.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to specify the inter-individual variability for the model parameters.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Kel, Rtot, KD, Kint, and Ka (see Table 3.2 for their mean-ings).

– Add variable Kdeg, and check the “Derived” checkbox below the variablename, and then enter Ksyn/R0 in the blue field that appears.

Page 67: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.9. TWO-COMPARTMENT WAGNER MODEL, FIRST-ORDER ABSORPTION 67

• In the Continuous tab, enter the information for V, Kel, Rtot, KD, Kint, and Ka

based on the information provided in Table 3.2.

2. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (3.21).

• In the Procedure Variable tab, add procedure variable C.

• In the Integrator Variables tab, add integrator variables Ctot and Aa.

• In the Code tab, enter the following information.

– Integrator initialization per subject:In the blue-shaded field for “Ctot(0)=”, enter 0In the blue-shaded field for “Aa(0)=”, enter 0

– Equations: enter the following statements in the yellow-shaded field

C = 1/2 * ((Ctot - Rtot - KD) + sqrt(abs((Ctot -

Rtot - KD))**2 + 4 * KD * Ctot))

– Differential equation(s): In the blue-shaded field for “Ctot'=”, enter

Ka * Aa/V - Kint * Ctot - (Kel - Kint)* C

In the blue-shaded field for “Aa'=”, enter

-Ka * Aa

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered.

• Dose to: choose Variable: Aa from the drop-down list.

4. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule.

3.9 Wagner Model with Two Compartments and First-

order Absorption

Here we consider a Wagner model with two compartments for an oral bolus case with ab-sorption assumed to be first-order. In such a case, (3.11) is rewritten as follows:

Aa(t) = −κaAa(t), (3.22a)

Ctot(t) =κaAa(t)

V− κintCtot(t)− (κel − κint)C(t)− κcpC(t) + κpc

Ap(t)

V, (3.22b)

Ap(t) = κcpV C(t)− κpcAp(t) (3.22c)

Page 68: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

68 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

with C given by

C =1

2

[Ctot −Rtot − κD +

√(Ctot −Rtot − κD)2 + 4κDCtot

], (3.22d)

and Rtot given by

Rtot ≡ R0. (3.22e)

Here Ctot(0) = 0 and Ap(0) = 0. The dose enters into the system through the initialcondition for Aa. For example, if a single oral bolus is administered at time 0 with dose D,then Aa(0) = D.

NONMEM codes for this model are given in Appendix 3.H.

Implementation in TS. Below are the key steps to implement this model in TS.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to specify the inter-individual variability for the model parameters.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Kel, Rtot, KD, Kint, Ka, Kcp, and Kpc (see Table 3.2 fortheir meanings).

• In the Continuous tab, enter the information for V, Kel, R0, KD, Kint, Ka, Kcp,and Kpc based on the information provided in Table 3.2.

2. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (3.22).

• In the Procedure Variable tab, add procedure variable C.

• In the Integrator Variables tab, add integrator variables Ctot, Aa, and Ap.

• In the Code tab, enter the following information.

– Integrator initialization per subject:In the blue-shaded field for “Ctot(0)=”, enter 0In the blue-shaded field for “Aa(0)=”, enter 0In the blue-shaded field for “Ap(0)=”, enter 0

– Equations: enter the following statements in the yellow-shaded field

C = 1/2 * ((Ctot - Rtot - KD) + sqrt(abs((Ctot -

Rtot - KD))**2 + 4 * KD * Ctot))

– Differential equation(s): In the blue-shaded field for “Ctot'=”, enter

Ka * Aa/V - Kint * Ctot - (Kel - Kint) * C - Kcp * C

+ Kpc * Ap/V

Page 69: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.9. TWO-COMPARTMENT WAGNER MODEL, FIRST-ORDER ABSORPTION 69

In the blue-shaded field for “Aa'=”, enter

-Ka * Aa

In the blue-shaded field for “Ap'=”, enter

Kcp * C * V - Kpc * Ap

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered.

• Dose to: choose Variable: Aa from the drop-down list.

4. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule.

Page 70: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

70 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

3.A NONMEM Codes: A Quasi-Equilibrium-Target-

Mediated Drug Disposition Model with One Com-

partment for an IV Case

;============================================================

; A QE-TMDD model with one compartment and IV bolus

; ===========================================================

$PROBLEM ONE -CPT QE-TMDD MODEL WITH IV BOLUS

$INPUT ID TIME AMT CMT DV

$DATA TMDD_ONECPT_IVBOLUS_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP = 2

COMP = (TOTLIG)

COMP = (TOTRECP)

; =============== STRUCTURAL MODEL PARAMETERS ==============

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KEL = ELIMINATION RATE

TVKEL = THETA (2)

KEL = TVKEL * EXP(ETA(2))

; R_0 = INITIAL FREE RECEPTOR CONCENTRATION

TVR_0 = THETA (3)

R_0 = TVR_0

; KD = DISSOCIATION CONSTANT

TVKD = THETA (4)

KD = TVKD

; KINT = INTERNALIZATION (DEGRADATION) OF COMPLEX

TVKINT = THETA (5)

KINT = TVKINT

; KSYN = SYNTHESIS RATE FOR RECEPTOR

TVKSYN = THETA (6)

Page 71: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.A. NONMEM: A ONE-COMPARTMENT QE-TMDD MODEL FOR AN IV CASE 71

KSYN = TVKSYN

; KDEG = DEGRATION RATE FOR THE RECEPTOR

KDEG = KSYN / R_0

; INITIAL CONDITION FOR TOTAL RECEPTOR

A_0 (2) = R_0

; ============= INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

0.9 ;TVV

0.0019 ; TVKEL

400 ; TVR_0

0.00076 ; TVKD

0.0007 ; TVKINT

0.22 ; TVKSYN

$OMEGA

0.01

0.01

; ============== ODE MODEL =================================

$DES

; TOTAL DRUG CONCENTRATION

CTOT = A(1)/V

; TOTAL RECEPTOR CONCENTRATION

RTOT = A(2)

; FREE DRUG CONCENTRATION

C = 1/2*(( CTOT - RTOT - KD) + SQRT((CTOT - RTOT - KD)**2 + 4

* KD * CTOT))

; TOTAL DRUG AMOUNT AT CENTRAL COMPARTMENT

DADT (1) = - KINT * A(1) - (KEL - KINT) * C * V

; TOTAL RECEPTOR CONCENTRATION AT CENTRAL COMPARTMENT

DADT (2) = KSYN - KDEG * A(2) - (KINT - KDEG) * (CTOT - C)

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

Page 72: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

72 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

$ERROR

C_TOT = A(1)/V

R_TOT = A(2)

IPRED = 1/2*(( C_TOT - R_TOT - KD) + SQRT(( C_TOT - R_TOT - KD

)**2 + 4 * KD * C_TOT))

Y = IPRED * (1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ===============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT ==========================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = TMDD_QE_ONECPT_IV_RTOTNONCONSTANT_SIMOUT

$TABLE REPL ID TIME V KEL R_0 KD KINT KSYN ONEHEADER NOPRINT

NOAPPEND FIRSTONLY

FILE = TMDD_QE_ONECPT_IV_RTOTNONCONSTANT_POSTHOC

3.B NONMEM Codes: A Quasi-Equilibrium-Target-

Mediated Drug Disposition Model with Two Com-

partments for an IV Case

;============================================================

; A QE-TMDD model with two compartments and IV bolus

; ============================================================

$PROBLEM TWO -CPT QE-TMDD MODEL WITH IV BOLUS

$INPUT ID TIME AMT CMT DV

$DATA TMDD_TWOCPT_IVBOLUS_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP = 3

COMP = (CENTRAL)

COMP = (PERIPH)

COMP = (TOTRECP)

; =============== STRUCTURAL MODEL PARAMETERS ===============

$PK

; V = VOLUMNE OF DISTRIBUTION

Page 73: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.B. NONMEM: A TWO-COMPARTMENT QE-TMDD MODEL FOR AN IV CASE 73

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KEL = ELIMINATION RATE

TVKEL = THETA (2)

KEL = TVKEL * EXP(ETA(2))

; R_0 = TOTAL RECEPTOR

TVR_0 = THETA (3)

R_0 = TVR_0

; KD = DISSOCIATION CONSTANT

TVKD = THETA (4)

KD = TVKD

; KINT = INTERNALIZATION (DEGRADATION) OF COMPLEX

TVKINT = THETA (5)

KINT = TVKINT

; KCP = RATE FROM CENTRAL COMP TO PERIPHERAL COMP

TVKCP = THETA (6)

KCP = TVKCP * EXP(ETA(3))

; KPC = RATE FROM PERIPHERIAL COMP TO CENTRAL COMP

TVKPC = THETA (7)

KPC = TVKPC * EXP(ETA(4))

; KSYN = SYNTHESIS RATE FOR RECEPTOR

TVKSYN = THETA (8)

KSYN = TVKSYN

; KDEG = DEGRATION RATE FOR THE RECEPTOR

KDEG = KSYN / R_0

; INITIAL CONDITION FOR TOTAL RECEPTOR

A_0 (3) = R_0

; =========== INITIAL VALUES FOR THETA AND OMEGA =============

$THETA

0.9 ;TVV

0.0019 ; TVKEL

400 ; TVR_0

0.00076 ; TVKD

0.0007 ; TVKINT

Page 74: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

74 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

0.03 ; TVKCP

0.0087 ; TVKPC

0.22 ; TVKSYN

$OMEGA

0.01 ; ETA_V

0.01 ; ETA_KEL

0.01 ; ETA_KCP

0.01 ; ETA_KPC

; ============== ODE MODEL ====================================

$DES

; TOTAL DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

CTOT = A(1)/V

; TOTAL RECEPTOR CONCENTRATION AT THE CENTRAL COMPARTMENT

RTOT = A(3)

; FREE DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

C = 1/2*(( CTOT - RTOT - KD) + SQRT((CTOT - RTOT - KD)**2 + 4

* KD * CTOT))

; TOTAL DRUG AMOUNT AT THE CENTRAL COMPARTMENT

DADT (1) = - KINT * A(1) - (KEL - KINT) * C * V - KCP * C * V

+ KPC * A(2)

; FREE DRUG AMOUNT AT THE PERIPHERIAL COMPARTMENT

DADT (2) = KCP * C * V - KPC * A(2)

; TOTAL RECEPTOR CONCENTRATION AT THE CENTRAL COMPARTMENT

DADT (3) = KSYN - KDEG * A(3) - (KINT - KDEG) * (CTOT - C)

; =============== RESIDUAL ERROR MODEL =======================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

C_TOT = A(1)/V

R_TOT = A(3)

IPRED = 1/2*(( C_TOT - R_TOT - KD) + SQRT(( C_TOT - R_TOT - KD

)**2 + 4 * KD * C_TOT))

Y = IPRED * (1 + EPS(1))

REPL = IREP

Page 75: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.C. NONMEM: ONE-COMPARTMENT QE-TMDD, FIRST-ORDER ABSORPTION 75

; ================ RUNNING MODE =============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = TMDD_QE_TWOCPT_IV_RTOTNONCONSTANT_SIMOUT

$TABLE REPL ID TIME V KEL R_0 KD KINT KCP KPC KSYN

ONEHEADER NOPRINT NOAPPEND FIRSTONLY

FILE = TMDD_QE_TWOCPT_IV_RTOTNONCONSTANT_POSTHOC

3.C NONMEM Codes: A Quasi-Equilibrium-Target-

Mediated Drug Disposition Model with One Com-

partment and First-order Absorption

;=============================================================

; A QE-TMDD model with one compartment and first -order

absorption

; ============================================================

$PROBLEM ONE -CPT QE-TMDD MODEL WITH FIRST -ORDER ABSORPTION

$INPUT ID TIME AMT CMT DV

$DATA TMDD_ONECPT_FIRSTORDERABSORP_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP = 3

COMP = (CENTRAL)

COMP = (ABSORP)

COMP = (TOTRECP)

; =============== STRUCTURAL MODEL PARAMETERS ===============

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KEL = ELIMINATION RATE

TVKEL = THETA (2)

KEL = TVKEL * EXP(ETA(2))

Page 76: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

76 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

; R_0 = INITIAL VALUE OF RECEPTOR

TVR_0 = THETA (3)

R_0 = TVR_0

; KD = DISSOCIATION CONSTANT

TVKD = THETA (4)

KD = TVKD

; KINT = INTERNALIZATION (DEGRADATION) OF COMPLEX

TVKINT = THETA (5)

KINT = TVKINT

; KA = ABSORPTION RATE

TVKA = THETA (6)

KA = TVKA * EXP(ETA(3))

; KSYN = SYNTHESIS RATE FOR RECEPTOR

TVKSYN = THETA (7)

KSYN = TVKSYN

; KDEG = DEGRATION RATE FOR THE RECEPTOR

KDEG = KSYN / R_0

; INITIAL CONDITION FOR TOTAL RECEPTOR

A_0 (3) = R_0

; ============= INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

0.9 ;TVV

0.0019 ; TVKEL

400 ; TVR_0

0.00076 ; TVKD

0.0007 ; TVKINT

0.2 ; TVKA

0.22 ; TVKSYN

$OMEGA

0.01 ; ETA V

0.01 ; ETA KEL

0.01 ; ETA KA

; ============== ODE MODEL ====================================

$DES

; TOTAL DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

Page 77: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.C. NONMEM: ONE-COMPARTMENT QE-TMDD, FIRST-ORDER ABSORPTION 77

CTOT = A(1)

; TOTAL RECEPTOR CONCENTRATION AT CENTRAL COMPARTMENT

RTOT = A(3)

; FREE DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

C = 1/2*(( CTOT - RTOT - KD) + SQRT((CTOT - RTOT - KD)**2 + 4

* KD * CTOT))

; TOTAL DRUG CONCENTRATION AT CENTRAL COMPARTMENT

DADT (1) = KA * A(2) / V - KINT * A(1) - (KEL - KINT) * C

; ABSORPTION COMPARTMENT

DADT (2) = - KA * A(2)

; TOTAL RECEPTOR CONCENTRATION AT THE CENTRAL COMPARTMENT

DADT (3) = KSYN - KDEG * A(3) - (KINT - KDEG) * (CTOT - C)

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

C_TOT = A(1)

R_TOT = A(3)

IPRED = 1/2*(( C_TOT - R_TOT - KD) + SQRT(( C_TOT - R_TOT - KD

)**2 + 4 * KD * C_TOT))

Y = IPRED * (1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ==============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =========================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE =

TMDD_QE_ONECPT_FIRSTORDERABSORP_RTOTNONCONSTANT_SIMOUT

$TABLE REPL ID TIME V KEL R_0 KD KINT KA KSYN ONEHEADER NOPRINT

NOAPPEND FIRSTONLY

FILE =

TMDD_QE_ONECPT_FIRSTORDERABSORP_RTOTNONCONSTANT_POSTHOC

Page 78: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

78 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

3.D NONMEM Codes: A Quasi-Equilibrium-Target-

Mediated Drug Disposition Model with Two Com-

partments and First-order Absorption

;==============================================================

; A QE-TMDD model with two compartments and first -order

absorption

; =============================================================

$PROBLEM TWO -CPT QE-TMDD MODEL WITH FIRST -ORDER ABSORPTION

$INPUT ID TIME AMT CMT DV

$DATA TMDD_TWOCPT_FIRSTORDERABSORP_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP = 4

COMP = (CENTRAL)

COMP = (ABSORP)

COMP = (PERIPH)

COMP = (TOTRECP)

; =============== STRUCTURAL MODEL PARAMETERS ==============

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KEL = ELIMINATION RATE

TVKEL = THETA (2)

KEL = TVKEL * EXP(ETA(2))

; R_0 = TOTAL RECEPTOR

TVR_0 = THETA (3)

R_0 = TVR_0

; KD = DISSOCIATION CONSTANT

TVKD = THETA (4)

KD = TVKD

; KINT = INTERNALIZATION (DEGRADATION) OF COMPLEX

TVKINT = THETA (5)

KINT = TVKINT

Page 79: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.D. NONMEM: TWO-COMPARTMENT QE-TMDD, FIRST-ORDER ABSORPTION79

; KA = ABSORPTION RATE

TVKA = THETA (6)

KA = TVKA * EXP(ETA(3))

; KCP = RATE FROM THE CENTRAL COMP TO PERIPHERIAL COMP

TVKCP = THETA (7)

KCP = TVKCP * EXP(ETA(4))

; KPC = RATE FROM THE PERIPHERIAL COMP TO THE CENTRAL COMP

TVKPC = THETA (8)

KPC = TVKPC * EXP(ETA(5))

; KSYN = SYNTHESIS RATE FOR RECEPTOR

TVKSYN = THETA (9)

KSYN = TVKSYN

; KDEG = DEGRATION RATE FOR THE RECEPTOR

KDEG = KSYN / R_0

; INITIAL CONDITION FOR TOTAL RECEPTOR

A_0 (4) = R_0

; ============ INITIAL VALUES FOR THETA AND OMEGA ==========

$THETA

0.9 ;TVV

0.0019 ; TVKEL

400 ; TVR_0

0.00076 ; TVKD

0.0007 ; TVKINT

0.2 ; TVKA

0.03 ; TVKCP

0.0087 ; TVKPC

0.22 ; TVKSYN

$OMEGA

0.01 ; ETA V

0.01 ; ETA KEL

0.01 ; ETA KA

0.01 ; ETA KCP

0.01 ; ETA KPC

; ============== ODE MODEL ====================================

$DES

; TOTAL DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

Page 80: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

80 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

CTOT = A(1)

; TOTAL RECEPTOR CONCENTRATION AT THE CENTRAL COMPARTMENT

RTOT = A(4)

; FREE DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

C = 1/2*(( CTOT - RTOT - KD) + SQRT((CTOT - RTOT - KD)**2 + 4

* KD * CTOT))

; TOTAL DRUG CONCENTRATION AT CENTRAL COMPARTMENT

DADT (1) = KA * A(2)/V - KINT * A(1) - (KEL - KINT) * C - KCP

* C + KPC * A(3)/V

; ABSORPTION COMPARTMENT

DADT (2) = - KA * A(2)

; FREE DRUG AMOUNT AT THE PERIPHERIAL COMPARTMENT

DADT (3) = KCP * C * V - KPC * A(3)

; TOTAL RECEPTOR CONCENTRATION AT THE CENTRAL COMPARTMENT

DADT (4) = KSYN - KDEG * A(4) - (KINT - KDEG) * (CTOT - C)

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

C_TOT = A(1)

R_TOT = A(4)

IPRED = 1/2*(( C_TOT - R_TOT - KD) + SQRT(( C_TOT - R_TOT - KD

)**2 + 4 * KD * C_TOT))

Y = IPRED * (1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ==============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =========================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE =

TMDD_QE_TWOCPT_FIRSTORDERABSORP_RTOTNONCONSTANT_SIMOUT

Page 81: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.E. NONMEM: A ONE-COMPARTMENT WAGNER MODEL FOR AN IV CASE 81

$TABLE REPL ID TIME V KEL R_0 KD KINT KA KCP KPC KSYN

ONEHEADER NOPRINT NOAPPEND FIRSTONLY

FILE =

TMDD_QE_TWOCPT_FIRSTORDERABSORP_RTOTNONCONSTANT_POSTHOC

3.E NONMEM Codes: Wagner Model with One Com-

partment for an IV Case

;============================================================

; Wagner TMDD model with one compartment

; A QE-TMDD model with one compartment and Rtot assumed to be

constant (Kint = KDeg)

; ===========================================================

$PROBLEM ONE -CPT WAGNER MODEL WITH IV BOLUS

$INPUT ID TIME AMT CMT DV

$DATA TMDD_ONECPT_IVBOLUS_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP=1

COMP = (CENTRAL)

; =============== STRUCTURE MODEL PARAMETERS ===============

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KEL = ELIMINATION RATE

TVKEL = THETA (2)

KEL = TVKEL * EXP(ETA(2))

; RTOT = TOTAL RECEPTOR

TVRTOT = THETA (3)

RTOT = TVRTOT

; KD = DISSOCIATION CONSTANT

TVKD = THETA (4)

KD = TVKD

; KINT = INTERNALIZATION (DEGRADATION) OF COMPLEX

Page 82: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

82 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

TVKINT = THETA (5)

KINT = TVKINT

; =========== INITIAL VALUES FOR THETA AND OMEGA =============

$THETA

0.9 ;TVV

0.0019 ; TVKEL

400 ; TVRTOT

0.00076 ; TVKD

0.0007 ; TVKINT

$OMEGA

0.01

0.01

; ============== ODE model ====================================

$DES

; TOTAL DRUG CONCENTRATION

CTOT = A(1)/V

; FREE DRUG CONCENTRATION

C = 1/2*(( CTOT - RTOT - KD) + SQRT((CTOT - RTOT - KD)**2 + 4

* KD * CTOT))

; COMPARTMENT FOR TOTAL DRUG AMOUNT

DADT (1) = - KINT * A(1) - (KEL - KINT) * C * V

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

C_TOT = A(1)/V

IPRED = 1/2*(( C_TOT - RTOT - KD) + SQRT(( C_TOT - RTOT - KD)

**2 + 4 * KD * C_TOT))

Y = IPRED * (1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

Page 83: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.F. NONMEM: A TWO-COMPARTMENT WAGNER MODEL FOR AN IV CASE 83

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = TMDD_QE_ONECPT_IV_RTOTCONSTANT_SIMOUT

$TABLE REPL ID TIME V KEL RTOT KD KINT ONEHEADER NOPRINT

NOAPPEND FIRSTONLY

FILE = TMDD_QE_ONECPT_IV_RTOTCONSTANT_POSTHOC

3.F NONMEM Codes: Wagner Model with Two Com-

partments for an IV Case

;=============================================================

; Wagner TMDD model with two compartments

; A QE-TMDD model with two compartments and Rtot assumed to be

constant (Kint = KDeg)

; ============================================================

$PROBLEM TWO -CPT WAGNER MODEL WITH IV BOLUS

$INPUT ID TIME AMT CMT DV

$DATA TMDD_TWOCPT_IVBOLUS_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP=2

COMP = (CENTRAL)

COMP = (PERIPH)

; =============== STRUCTURE MODEL PARAMETERS ==============

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KEL = ELIMINATION RATE

TVKEL = THETA (2)

KEL = TVKEL * EXP(ETA(2))

; RTOT = TOTAL RECEPTOR

TVRTOT = THETA (3)

RTOT = TVRTOT

; KD = DISSOCIATION CONSTANT

TVKD = THETA (4)

Page 84: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

84 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

KD = TVKD

; KINT = INTERNALIZATION (DEGRADATION) OF COMPLEX

TVKINT = THETA (5)

KINT = TVKINT

; KCP = RATE FROM CENTRAL COMP TO PERIPHERAL COMP

TVKCP = THETA (6)

KCP = TVKCP * EXP(ETA(3))

; KPC = RATE FROM PERIPHERIAL COMP TO CENTRAL COMP

TVKPC = THETA (7)

KPC = TVKPC * EXP(ETA(4))

; ========= INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

0.9 ;TVV

0.0019 ; TVKEL

400 ; TVRTOT

0.00076 ; TVKD

0.0007 ; TVKINT

0.03 ; TVKCP

0.0087 ; TVKPC

$OMEGA

0.01 ; ETA_V

0.01 ; ETA_KEL

0.01 ; ETA_KCP

0.01 ; ETA_KPC

; ============== ODE model ====================================

$DES

; TOTAL DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

CTOT = A(1)/V

; FREE DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

C = 1/2*(( CTOT - RTOT - KD) + SQRT((CTOT - RTOT - KD)**2 + 4

* KD * CTOT))

; COMPARTMENT FOR TOTAL DRUG AMOUNT AT THE CENTRAL

COMPARTMENT

DADT (1) = - KINT * A(1) - (KEL - KINT) * C * V - KCP * C * V

+ KPC * A(2)

; COMPARTMENT FOR FREE DRUG AMOUNT AT THE PERIPHERIAL

Page 85: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.G. NONMEM: ONE-COMPARTMENTWAGNERMODEL, FIRST-ORDER ABSORPTION85

COMPARTMENT

DADT (2) = KCP * C * V - KPC * A(2)

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

C_TOT = A(1)/V

IPRED = 1/2*(( C_TOT - RTOT - KD) + SQRT(( C_TOT - RTOT - KD)

**2 + 4 * KD * C_TOT))

Y = IPRED * (1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = TMDD_QE_TWOCPT_IV_RTOTCONSTANT_SIMOUT

$TABLE REPL ID TIME V KEL RTOT KD KINT KCP KPC

ONEHEADER NOPRINT NOAPPEND FIRSTONLY

FILE = TMDD_QE_TWOCPT_IV_RTOTCONSTANT_POSTHOC

3.G NONMEM Codes: Wagner Model with One Com-

partment and First-order Absorption

;

===============================================================

; Wagner TMDD model with one compartment and first -order

absorption

; A QE-TMDD model with one compartment , first -order absorption

and Rtot assumed to be constant (Kint = KDeg)

;

==============================================================

$PROBLEM ONE -CPT WAGNER MODEL WITH FIRST -ORDER ABSORPTION

Page 86: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

86 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

$INPUT ID TIME AMT CMT DV

$DATA TMDD_ONECPT_FIRSTORDERABSORP_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP=2

COMP = (CENTRAL)

COMP = (ABSORP)

; =============== STRUCTURAL MODEL PARAMETERS =================

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KEL = ELIMINATION RATE

TVKEL = THETA (2)

KEL = TVKEL * EXP(ETA(2))

; RTOT = TOTAL RECEPTOR

TVRTOT = THETA (3)

RTOT = TVRTOT

; KD = DISSOCIATION CONSTANT

TVKD = THETA (4)

KD = TVKD

; KINT = INTERNALIZATION (DEGRADATION) OF COMPLEX

TVKINT = THETA (5)

KINT = TVKINT

; KA = ABSORPTION RATE

TVKA = THETA (6)

KA = TVKA * EXP(ETA(3))

; ============= INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

0.9 ;TVV

0.0019 ; TVKEL

400 ; TVRTOT

0.00076 ; TVKD

0.0007 ; TVKINT

0.2 ; TVKA

Page 87: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.G. NONMEM: ONE-COMPARTMENTWAGNERMODEL, FIRST-ORDER ABSORPTION87

$OMEGA

0.01 ; ETA V

0.01 ; ETA KEL

0.01 ; ETA KA

; ============== ODE model ====================================

$DES

; TOTAL DRUG CONCENTRATION

CTOT = A(1)

; FREE DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

C = 1/2*(( CTOT - RTOT - KD) + SQRT((CTOT - RTOT - KD)**2 + 4

* KD * CTOT))

; TOTAL DRUG CONCENTRATION AT CENTRAL COMPARTMENT

DADT (1) = KA * A(2) / V - KINT * A(1) - (KEL - KINT) * C

; ABSORPTION COMPARTMENT

DADT (2) = - KA * A(2)

; =============== RESIDUAL ERROR MODEL =======================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

C_TOT = A(1)

IPRED = 1/2*(( C_TOT - RTOT - KD) + SQRT((C_TOT - RTOT - KD)

**2 + 4 * KD * C_TOT))

Y = IPRED * (1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = TMDD_QE_ONECPT_FIRSTORDERABSORP_RTOTCONSTANT_SIMOUT

$TABLE REPL ID TIME V KEL RTOT KD KINT KA ONEHEADER NOPRINT

NOAPPEND FIRSTONLY

FILE = TMDD_QE_ONECPT_FIRSTORDERABSORP_RTOTCONSTANT_POSTHOC

Page 88: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

88 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

3.H NONMEM Codes: Wagner Model with Two Com-

partments and First-order Absorption

;============================================================

; Wagner TMDD model with two compartments and first -order

absorption

; A QE-TMDD model with two compartments , first -order

absorption and Rtot assumed to be constant (Kint = KDeg)

; ===========================================================

$PROBLEM TWO -CPT WAGNER MODEL WITH FIRST -ORDER ABSORPTION

$INPUT ID TIME AMT CMT DV

$DATA TMDD_TWOCPT_FIRSTORDERABSORP_SIMIN.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP = 3

COMP = (CENTRAL)

COMP = (ABSORP)

COMP = (PERIPH)

; =============== STRUCTURAL MODEL PARAMETERS =================

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KEL = ELIMINATION RATE

TVKEL = THETA (2)

KEL = TVKEL * EXP(ETA(2))

; RTOT = TOTAL RECEPTOR

TVRTOT = THETA (3)

RTOT = TVRTOT

; KD = DISSOCIATION CONSTANT

TVKD = THETA (4)

KD = TVKD

; KINT = INTERNALIZATION (DEGRADATION) OF COMPLEX

TVKINT = THETA (5)

KINT = TVKINT

Page 89: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

3.H. NONMEM: TWO-COMPARTMENTWAGNERMODEL, FIRST-ORDER ABSORPTION89

; KA = ABSORPTION RATE

TVKA = THETA (6)

KA = TVKA * EXP(ETA(3))

; KCP = RATE FROM THE CENTRAL COMP TO PERIPHERIAL COMP

TVKCP = THETA (7)

KCP = TVKCP * EXP(ETA(4))

; KPC = RATE FROM THE PERIPHERIAL COMP TO THE CENTRAL COMP

TVKPC = THETA (8)

KPC = TVKPC * EXP(ETA(5))

; =========== INITIAL VALUES FOR THETA AND OMEGA =============

$THETA

0.9 ;TVV

0.0019 ; TVKEL

400 ; TVRTOT

0.00076 ; TVKD

0.0007 ; TVKINT

0.2 ; TVKA

0.03 ; TVKCP

0.0087 ; TVKPC

$OMEGA

0.01 ; ETA V

0.01 ; ETA KEL

0.01 ; ETA KA

0.01 ; ETA KCP

0.01 ; ETA KPC

; ============== ODE MODEL ====================================

$DES

; TOTAL DRUG CONCENTRATION

CTOT = A(1)

; FREE DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

C = 1/2*(( CTOT - RTOT - KD) + SQRT((CTOT - RTOT - KD)**2 + 4

* KD * CTOT))

; TOTAL DRUG CONCENTRATION AT THE CENTRAL COMPARTMENT

DADT (1) = KA * A(2)/V - KINT * A(1) - (KEL - KINT) * C - KCP

* C + KPC * A(3)/V

; ABSORPTION COMPARTMENT

Page 90: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

90 CHAPTER 3. TARGET-MEDIATED DRUG DISPOSITION MODELS

DADT (2) = - KA * A(2)

; FREE DRUG AMOUNT AT THE PERIPHERIAL COMPARTMENT

DADT (3) = KCP * C * V - KPC * A(3)

; =============== RESIDUAL ERROR MODEL =======================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

C_TOT = A(1)

IPRED = 1/2*(( C_TOT - RTOT - KD) + SQRT((C_TOT - RTOT - KD)

**2 + 4 * KD * C_TOT))

Y = IPRED * (1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ==============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT ========================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = TMDD_QE_TWOCPT_FIRSTORDERABSORP_RTOTCONSTANT_SIMOUT

$TABLE REPL ID TIME V KEL RTOT KD KINT KA KCP KPC

ONEHEADER NOPRINT NOAPPEND FIRSTONLY

FILE = TMDD_QE_TWOCPT_FIRSTORDERABSORP_RTOTCONSTANT_POSTHOC

Page 91: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

Chapter 4

Models with Discontinuous Actions

4.1 Introduction

There are many kinds of models involving discrete time-based events at which discontinuouschanges can occur in a model.

Discontinuous actions can occur when an action needs to be performed right before/afteradministering a dose or reading an observation. Sometimes this happens when one mayneed to reset one or multiple compartments/variables right before/after each observation ordose. For example, one may need to reset the compartment for AUC, the area under theconcentration-time curve, to zero right before delivery of each dose.

Discontinuous actions can also occur in dynamic models where parameters are discontinu-ously changed at specific times. This type of model is sometimes called change-point models.For example, in the case where a compound exhibits enterohepatic circulation kinetics (e.g.,see [14]), there is biliary excretion followed by intestinal reabsorption of the compound,where the periodic release rate from the gall bladder to the absorption compartment is oftenmodeled using an on/off switch.

Note that the ODE solver may not integrate properly over a discontinuity. Hence, in eitherNONMEM or TS, one should avoid using if-then statements to make discontinuous changesin the ODEs based on the value of time. Instead, the discontinuities should be setup asscheduled events (such as doses or observations) so that the software knows when to stopthe solver to execute these schedule actions before it advances to the next step.

91

Page 92: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

92 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

4.1.1 How to schedule events at specific times in Trial Simulator?

Four blocks can be used in TS to schedule events at specific times. They are Formulation,Response, Action at Times, and Event. Specifically, Formulation (or Response) block caninclude actions to be performed right before or after each dose (or observation); Actions atTimes blocks can schedule statements at the beginning of a replicate or a subject, at the endof a replicate or a subject, and at specific times; and Event blocks can schedule statementson a periodic basis. It is worth noting that all of these blocks can include algebraic andlogical calculations as well as calls to custom FORTRAN subroutines. In addition, bothmodel and integrator variables can be assigned values during a scheduled event execution.For the convenience of readers, these four blocks and their functionalities are summarized inTable 4.1.

Block Time of execution

FormulationBefore a dose is administered

After a dose is administered

ResponseBefore an observation is made

After an observation is made

Actions at Times

Beginning of a replicate

End of a replicate

Beginning of a subject

End of a subject

At a given time

Event Periodical action

Table 4.1: Blocks used to schedule events at specific times.

Often these four blocks can be directly used to schedule statements at specific times. How-ever, in some situations, some tricks are needed to achieve this. For example, one mayneed to schedule statements at some time after each dose. A trick to do that is to create adummy formulation that has the same schedules as the involved formulation, and then useits property “Offset Time” to achieve this. Recall that “Offset Time” in the Formulation(Response) block denotes the difference from scheduled dose (observation) time. Hence, itcan be used here along with property “Do After Dose” to schedule statements at some timeafter each dose (even though “Offset Time” is designed for models with imperfect adherenceto the protocol). Some examples will be given later to demonstrate this.

Page 93: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.2. RESET A COMPARTMENT RIGHT AFTER EACH OBSERVATION 93

4.2 A Two-Compartment Model with Urine Compart-

ment Reset Right After Each Observation

Here we show how to reset a compartment right after each observation. The example demon-strated is a two-compartment model with an IV bolus

A = −clC − cl2(C − C2),

A2 = cl2(C − C2),

Au = clC.

(4.1)

Here A, A2 and Au denotes the amount of drug at the central, peripheral, and urine com-partments, respectively, with cl being the clearance rate from the central compartment andcl2 being the inter-compartment clearance rate. The concentration of drug at the centraland peripheral compartments is respectively represented by C and C2; that is,

C =A

V, C2 =

A2

V2

with V and V2 respectively being the volume of distribution for the central and peripheralcompartments. Again, A2(0) = 0, Au(0) = 0, and the doses enter into the system through theinitial condition for variable A. In addition, Au is reset to zero right after each observation.

For this example, there are two observables. One is drug concentration at the central com-partment with the residual error assumed to be proportional

Yp,ij = C(tij)(1 + Ep,ij), j = 1, 2, . . . , np,i, i = 1, 2, . . . , NSUB, (4.2)

and, the other is drug amount at the urine compartment with the residual error also assumedto be proportional

Yu,ij = Au(tij)(1 + Eu,ij), j = 1, 2, . . . , nu,i, i = 1, 2, . . . , NSUB. (4.3)

Here np,i denotes the number of observations of drug concentration at the central compart-ment for subject i, and nu,i is the number of observations of drug amount at the urinecompartment for subject i. In addition, Ep,ij’s are assumed to i.i.d. normally distributedwith zero mean and constant variance σ2

p (σp is set to be 0.1 in the simulation), and Eu,ij’sare assumed to i.i.d. normally distributed with zero mean and constant variance σ2

u (σu is setto be 0.2 in the simulation). Furthermore, Ep,ij’s and Eu,ij’s are assumed to be independentof each other.

All the structural model parameters are assumed to be log-normally distributed. For conve-nience, the meaning of these model parameters as well as the corresponding values used inthe simulation are listed in Table 4.2.

Page 94: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

94 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

Param Code Meaning Distribution Median value ω

V Vapparent volume of distributionfor the central compartment

log-normal 5 0.1

cl Cl central clearance rate log-normal 1 0.2

V2 V2apparent volume of distributionfor the peripheral compartment

log-normal 3 0.3

cl2 Cl2 inter-compartment clearance log-normal 0.5 0.3

Table 4.2: Structural model parameters and their values used in the simulation for a two-compartment model in an IV case with urine compartment reset right after each observation.Please note that the “Code” column lists the corresponding notations used in TS code blocks,and the same notation is also used in NONMEM code but with all the characters in uppercase. The “ω” column specifies the standard deviation of the logarithm of the correspondingrandom variables.

4.2.1 Implementation in NONMEM

In NONMEM, CMT = - N and EVID = 2 can be used to reset the Nth compartment to zero,and then a subsequent CMT = N and EVID = 2 are used to turn on this compartment again(that is, this compartment will then start to accumulate). This is the technique used hereto reset the urine compartment, Au, to zero right after each of its observation times.

The system of ODEs (4.1) is specified through the $DES block in the NONMEM codes asfollows:

$DES

DADT (1) = - CL*A(1)/V - CL2*(A(1)/V - A(2)/V2)

DADT (2) = CL2*(A(1)/V - A(2)/V2)

DADT (3) = CL*A(1)/V

Hence, to reset the urine compartment Au (that is, the third compartment in the code), weadd two extra rows in the input dataset for each of its observation times: one row with CMT

= - 3 and EVID = 2 to reset Au to zero, and the other row with CMT = 3 and EVID = 2 toturn on this compartment again. Table 4.3 is a fragment of the input dataset: the “DVID”column is used to specify whether the observation is for the central compartment (DVID =1) or the urine compartment (DVID = 2), and those two extra rows used to reset the urinecompartment are highlighted in cyan.

The complete NONMEM codes for this example are given in Appendix 4.A.

Page 95: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.2. RESET A COMPARTMENT RIGHT AFTER EACH OBSERVATION 95

CID TIME AMT CMT DVID EVID DV

1 0.00 10 1 1 1 .

1 0.50 . . 1 0 .

1 10.00 . . 1 0 .

1 12.00 . . 1 0 .

1 12.00 . . 2 0 .

1 12.00 . -3 . 2 .

1 12.00 . 3 . 2 .

1 14.00 . . 1 0 .

1 16.00 . . 1 0 .

1 22.00 . . 1 0 .

1 24.00 . . 1 0 .

1 24.00 . . 2 0 .

1 24.00 . -3 . 2 .

1 24.00 . 3 . 2 .

Table 4.3: A fragment of the input dataset for a two-compartment model in an IV casewith urine compartment reset right after each observation: the “DVID” column is used tospecify whether the observation is for the central compartment (DVID = 1) or the urinecompartment (DVID = 2), and those rows highlighted in cyan are used to reset the urinecompartment to be zero and then turn it on again.

4.2.2 Implementation in Trial Simulator

To reset the urine compartment, Au, to zero right after each observation, one can use theproperty “Do After Obs” of the Response block to do that. Below are the key steps toimplement this model with Step 6 used to specify the residual error model (4.3) and resetAu to be zero right after each of the observation times.

1. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to define the structural model parameters listed in Table 4.2.

• In the Parameter tab, add variables to define those structural model parameterslisted in Table 4.2, and choose “subject param” from the drop-down list of theLevel field.

• In the Continuous tab, enter the information for these variables based on theinformation provided in Table 4.2.

Page 96: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

96 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

2. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (4.1).

• In the Integrator Variables tab, add integrator variables A, A2, and Au.

• In the Code tab,

– Integrator initialization per subject: enter 0 in each of blue-shaded fields.

– Differential equation(s): In the blue-shaded field for “A'=”, enter

- Cl*A/V - Cl2 * (A/V - A2/V2)

In the blue-shaded field for “A2'=”, enter Cl2 * (A/V - A2/V2)

In the blue-shaded field for “Au'=”, enter Cl*A/V

3. Add a Formulation block, Test_Drug, and enter the following information in its prop-erty dialog box to specify the compartment to which the dose is administered.

• Dose to: choose Variable: A from the drop-down list.

4. Add an Expression block and enter the following information in its property dialog boxto specify drug concentration at the central compartment.

• Block Name: C

• Expression: enter A/V in the blue-shaded field.

5. Specify the residual error model (4.2).

• Add a Continuous Distribution block to specify the residual error. Specifically,enter the following information in its Block Properties dialog box:

– Block Name: pEps

– Type: Normal

– Level: event

– Mean: 0

– Var(x): 0.01

• Add an Expression block and enter the following information in its Block Prop-erties dialog box to specify the residual error model (4.2):

– Block Name: Yp

– Expression: enter C * (1 + pEps) in the blue-shaded field.

• Add a Response block and enter the following information in the Block Propertiesdialog box to specify the observation.

– Block Name: DVp

• Wire the Yp output to the first input node of DVp.

6. Specify the residual error model (4.3) and reset the urine compartment to be zero rightafter each observation.

Page 97: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.2. RESET A COMPARTMENT RIGHT AFTER EACH OBSERVATION 97

• Add a Continuous Distribution block to specify the residual error. Specifically,enter the following information in its Block Properties dialog box:

– Block Name: uEps

– Type: Normal

– Level: event

– Mean: 0

– Var(x): 0.04

• Add an Expression block and enter the following information in its Block Prop-erties dialog box to specify the residual error model (4.3).

– Block Name: Yu

– Expression: enter Au * (1 + uEps) in the blue-shaded field.

• Add a Response block and enter the following information in its Block Propertiesdialog box to specify the observation as well as reseting the urine compartmentto be zero.

– Block Name: DVu

– Do After Obs: enter the following statement in the yellow-shaded field toreset the urine compartment to be zero

Au=0

• Wire the Yu output to the first input node of DVu.

Page 98: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

98 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

7. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule as planned.

8. In the Observations page, specify the observation times for the drug amount at thecentral and urine compartments, respectively.

4.3 A First-order Absorption Model with Absorption

Rate Discontinuously Changed at Specific Times

In this section, we demonstrate how to properly implement a model with a parameter thatis discontinuously changed at specific times. The example is a one-compartment model withfirst-order absorption given by

Aa(t) = −κa(t)Aa(t),

A(t) = κa(t)Aa(t)−clVA(t).

(4.4)

Here Aa denotes the drug amount at the absorption compartment with the absorption rate,κa, changing it values at time tka after each dosing event. Specifically, in the kth inter-doseinterval (i.e., t ∈ [tD,k, tD,k+1) with tD,k being the time point for the kth dosing event), κa isdefined by

κa(t) =

κa,b, if tD,k ≤ t < tD,k + tka,

κa,a, if tD,k + tka ≤ t < tD,k+1,

(4.5)

k = 1, 2, . . . , ndose with ndose being the number of dosing events, where κa,b denotes the first-order absorption rate before the change-point, and κa,a is the first-order absorption rate afterthe change-point. Compartment A represents the drug amount at the central compartmentwith V and cl respectively being the volume of distribution and the clearance rate for thiscompartment. The initial condition for A is zero (that is, A(0) = 0), and the dose entersinto the system through the initial condition for Aa in each dosing interval.

Again, all the structural model parameters are assumed to be log-normally distributed withall the random effects uncorrelated. For convenience, the meaning of these model parametersas well as the corresponding values used in the simulation are listed in Table 4.4.

In simulation, two treatment arms are considered: For Treatment Arm 1, a dose is adminis-tered at time zero, and then 10 additional identical doses are administered with the inter-doseinterval being 12 time units; For Treatment Arm 2, a dose is administered at time zero, andthen 5 additional identical doses are administered with the inter-dose interval being 24 timeunits.

Page 99: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.3. PARAMETERS DISCONTINUOUSLY CHANGED AT SPECIFIC TIMES 99

Param Code Meaning Distribution Median value ω

V V

apparent volume ofdistribution for thecentral compartment

log-normal 100 0.1

cl Cl central clearance rate log-normal 10 0.1

κa,b Ka_bChangePt

first-order absorptionrate before the change-point

log-normal 0.01 0.1

κa,a Ka_aChangePt

first-order absorptionrate after the change-point

log-normal 0.1 0.1

tka TimePt_KaChange

time point where ab-sorption rate changesits value after each dos-ing event

log-normal 5 0.1

Table 4.4: Structural model parameters and their values used in the simulation for a one-compartment model with first-order absorption, where the value of the absorption rate isdiscontinuously changed at specific times. Please note that the “Code” column lists thecorresponding notations used in TS code blocks, and the same notation is also used inNONMEM code but with all the characters in upper case for all the parameters except tka(the reserved variable ALAG3 needed to be used). The “ω” column specifies the standarddeviation of the logarithm of the corresponding random variables.

4.3.1 Implementation in NONMEM

Note that the model event time parameter, MTIME, can be used to define a time at which thesystem is updated. Hence, it can be used to implement such type of models. In addition, itis the easiest method in the case where there is only one dosing event involved. However,as indicated in [15], this method becomes inconvenient/difficult in a multiple-dosing-eventcase. For such a case, a more convenient way is to use a dummy compartment and thenperform the following:

• Place a dummy amount of the dose into the dummy compartment at the scheduleddosing event time points (see Table 4.5 for the highlighted row in cyan color).

• Set a time lag for the dummy compartment to change the value of the absorption rate,where the time lag is set to be tka.

The NONMEM codes using this technique are given in Appendix 4.B.

Page 100: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

100 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

CID TIME AMT CMT ADDL II DV

1 0.00 100 1 10 12 .

1 0.00 99999 3 10 12 .

1 1.00 . . . . .

1 2.00 . . . . .

1 3.00 . . . . .

1 4.00 . . . . .

Table 4.5: A fragment of the input dataset for a first-order absorption model with theabsorption rate that is discontinuously changed at specific times, where the row highlighted incyan color is for placing a dummy amount of the dose, 99999, into the dummy compartment,compartment 3 in the code, at the scheduled dosing event time points.

4.3.2 Implementation in Trial Simulator

If a single dosing event is considered, then a simple way to implement such a model is touse an Actions At Times block. Similar to the MTIME in NONMEM, this method becomesinconvenient/difficult, if not impossible, for multiple dosing events, especially in the casewhere treatment schedules vary among treatment arms.

A better, though less direct, way is to use the trick of dummy formulation discussed atthe beginning of this chapter. Specifically, we use the property “Dose to” of Test_Drug tospecify the compartment to which the dose is administered, and the property “Do BeforeDose” to specify the value of the absorption rate before the change time point (see the leftpanel of Figure 4.1). We then create a dummy formulation, DummyFormulation, that hasthe same treatment schedules as Test_Drug, and use its properties “Offset Time” and “DoBefore Dose” to change the value of the absorption rate: the “Offset Time” specifies the timepoint where the change occurs after each dosing event, and the “Do Before Dose” resets theabsorption rate to the new value (see the right panel of Figure 4.1).

For convenience, the key steps in implementing this model in TS are summarized below.

1. Add a Model Variable block to define the absorption rate Ka. In its property dialogbox:

• Add the variable, Ka, and then set its default value to be zero.

2. Add a Multivariate Distribution block to define the structural model parameters listedin Table 4.4.

• In the Parameter tab, add variables to define those structural model parameterslisted in Table 4.4, and choose “subject param” from the drop-down list of the

Page 101: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.3. PARAMETERS DISCONTINUOUSLY CHANGED AT SPECIFIC TIMES 101

Figure 4.1: The block properties of Test_Drug (left panel) and DummyFormulation (rightpanel) for a first-order absorption model with the value of the absorption rate that is dis-continuously changed at TimePt_KaChange after each dose.

Level field.

• In the Continuous tab, enter the information for these variables based on theinformation provided in Table 4.4.

3. Add a Procedure block and enter the following information in its property dialog boxto specify the system of ODEs (4.4).

• In the Integrator Variables tab, add integrator variables Aa and A.

• In the Code tab,

– Integrator initialization per subject: enter 0 in each of blue-shaded fields.

– Differential equation(s): enter the following expression

-Ka * Aa

in the blue-shaded field for “Aa'=”, and enter

Ka * Aa - Cl/V * A

in the blue-shaded field for “A'=”.

4. Add a Formulation block, Test_Drug, to specify the compartment to which the dose isadministered as well as setting the absorption rate to its value before the change-point.Specifically, in its property dialog box, enter the following information:

• Dose to: choose Variable: Aa from the drop-down list.

• Do Before Dose: enter the following statement in the yellow-shaded field

Ka = Ka_bChangePt

Page 102: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

102 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

5. Add another formulation block, DummyFormulation, to change the value of the absorp-tion rate

• Wire the TimePt_KaChange output to the Offset Time of the DummyFormulation

(by dragging the output of TimePt_KaChange to the first input node of theDummyFormulation).

• In the property “Do Before Dose”, enter the following statement in the yellow-shaded field

Ka = Ka_aChangePt

6. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule as planned.

7. In the Treatments page, add DummyFormulation in each Treatment Arm that is con-sidered

• Set the dose to be any valid number (such as 99999 used in the example).

• Set the schedule to be the same as that for the true formulation Test_Drug.

4.4 A Zero-order Absorption Model without Time Lag

Zero-order absorption models have often been used as an alternative way to describe typicalabsorption profiles when first-order absorption models fail to give satisfactory fitting results.It has been found that a number of drugs do exhibit zero-order absorption kinetics, includingethanol, sulfisoxazole, griseofulvin, erythromycin, and hydroflumethiazide (e.g., see [16] andthe references therein).

The example demonstrated is a one-compartment model with Michaelis-Menten eliminationin the case where a single oral bolus is administered at time 0 with dose D. The model is

Page 103: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.4. A ZERO-ORDER ABSORPTION MODEL WITHOUT TIME LAG 103

given as follows:

A(t) = Input(t)− VmaxA(t)

κMV + A(t),

A(0) = 0.

(4.6)

Here A denotes the amount of drug at the central compartment, Vmax represents the maximumelimination rate (amount per unit time), κM denotes the drug concentration necessary toproduce half of the maximum elimination rate, and V is the apparent volume of distributionfor the central compartment. In addition, Input(t) denotes the input rate (amount per unitof time) of the drug into the central compartment at time t due to the zero-order absorption,and is given by

Input(t) =

D

tdur

, 0 ≤ t ≤ tdur,

0, otherwise,

(4.7)

where D is the dose administered at time 0, and tdur denotes the duration of the zero-orderabsorption. Thus, we see that zero-order absorption models have the same mathematicalform as those with the drug administered through IV infusion except that the duration, tdur,is a structural model parameter.

Note that Input in the zero-order absorption models changes discontinuously. Hence, theseare a special type of change-point models. Even though zero-order absorption models can bedirectly implemented in NONMEM without explicitly specifying the input rate to the centralcompartment, there is no direct way to do this in TS. That is why we put this example inthis chapter. Please note that the technique used to implement this model in TS is alsoapplicable to the multiple-dosing-event case.

Again, all the structural model parameters are assumed to be log-normally distributed. Forconvenience, the meaning of these model parameters as well as the corresponding values usedin the simulation are listed in Table 4.6.

4.4.1 Implementation in NONMEM

As discussed above, the zero-order absorption model can be directly implemented in NON-MEM without explicitly specifying the input rate to the central compartment. In otherwords, (4.6) is specified in $DES block as follows:

$DES

DADT (1) = -VMAX*A(1)/(KM*V + A(1))

And the input rate to the central compartment, Input, is implicitly incorporated into themodel through the following steps: one adds a column RATE in the input dataset with itsvalue setting to be -2 in the corresponding dosing row (see the highlighted row in Table 4.7),and then specifies the duration of the zero-order absorption through the reserved variableD1 in the $PK block (see Appendix 4.C for the complete NONMEM codes).

Page 104: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

104 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

Param Code Meaning Distribution Median value ω

V Vapparent volume of distributionfor the central compartment

log-normal 5 0.1

κM Km

drug concentration necessary toproduce half of the maximumelimination rate

log-normal 1 0.1

Vmax Vmax maximum elimination rate log-normal 2 0.1

tdur D1duration of the zero-order ab-sorption

log-normal 6 0.1

Table 4.6: Structural model parameters and their values used in the simulation for a one-compartment model with Michaelis-Menten elimination and zero-order absorption that hasno time lag. Please note that the “Code” column lists the corresponding notations usedin TS code blocks, and the same notation is also used in NONMEM code but with all thecharacters in upper case. The “ω” column specifies the standard deviation of the logarithmof the corresponding random variables.

CID TIME AMT CMT RATE DV

1 0.00 10 1 -2 .

1 0.50 . . . .

1 1.00 . . . .

1 2.00 . . . .

Table 4.7: A fragment of the input dataset for a one-compartment model with zero-orderabsorption: RATE = -2 means that the duration will be specified in the $PK block.

4.4.2 Implementation in Trial Simulator

In TS, the input rate to the central compartment has to be explicitly incorporated intothe model. To do this, the property “Do After Dose” of Test_Drug is used to specify thenonzero input rate due to the zero-order absorption, the nonzero input rate given in (4.7)(see the left panel of Figure 4.2, from which we can see that the name Test_Drug is useddirectly here to represent the dose administered, just like what we discussed previously inthe Introduction chapter). We then create a dummy formulation, DummyFormulation, thathas the same treatment schedules as Test_Drug, and use its properties “Offset Time” and“Do Before Dose” to change the value of the input rate: the “Offset Time” specifies the timepoint at which the zero-order absorption is over after each dosing event, and the “Do BeforeDose” resets the input rate to zero (see the right panel of Figure 4.2).

Page 105: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.4. A ZERO-ORDER ABSORPTION MODEL WITHOUT TIME LAG 105

Figure 4.2: The block properties of Test_Drug (left panel) and DummyFormulation (rightpanel) for a one-compartment model with zero-order absorption. As discussed previously inthe Introduction chapter, the name Test_Drug can be used directly in the codes to representthe dose.

For convenience, the key steps of implementing this model in TS are summarized below.

1. Add a Model Variable block to define the input rate, Input, to the central compartmentdue to the zero-order absorption process. In its property dialog box:

• Add a variable, Input, and then set its default value to be zero.

2. Add a Multivariate Distribution block to define the structural model parameters listedin Table 4.6.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables to define those structural model parameters listed in Table 4.6.

• In the Continuous tab, enter the information for these variables based on theinformation provided in Table 4.6.

3. Add a Procedure block to specify the system of ODEs (4.6). In its property dialogbox, perform the following:

• In the Integrator Variables tab, add integrator variable A.

• In the Code tab,

– Integrator initialization per subject: enter 0 in the blue-shaded field.

– Differential equation(s): enter the following expression

Page 106: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

106 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

Input - Vmax*A/(Km * V + A)

in the blue-shaded field for “A'=”.

4. Add a Formulation block, Test_Drug, to define the dosing input for the zero-orderabsorption. Specifically, in its property dialog box:

• Do After Dose: enter the following statement in the yellow-shaded field

Input = Test_Drug/D1

5. Add another Formulation block, DummyFormulation, to change the input rate to zerowhen the zero-order absorption is over.

• Wire the D1 output to the first input node of DummyFormulation (i.e., the OffsetTime).

• In the property of “Do Before Dose” of DummyFormulation, enter the followingstatement in the yellow-shaded field

Input = 0

6. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule as planned.

7. In the Treatments page, add DummyFormulation in each Treatment Arm that is con-sidered.

• Set the dose to be any valid number (such as 99999 used in the example).

• Set the schedule to be the same as that for the true formulation Test_Drug.

4.5 A Zero-order Absorption Model with Time Lag

In some cases, one may find it is necessary to incorporate a time lag into the zero-orderabsorption model to better describe the PK profile. Hence, the example considered here isstill the zero-order absorption model given by (4.6) but with a time lag. In this case, Inputis given by

Input(t) =

D

tdur

, tlag ≤ t ≤ tdur + tlag,

0, otherwise,

(4.8)

where tlag denotes the lag time for the zero-order absorption process.

The distribution form of the structural model parameters as well as the corresponding valuesused in the simulation are listed in Table 4.8.

Page 107: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.5. A ZERO-ORDER ABSORPTION MODEL WITH TIME LAG 107

Param Code Meaning Distribution Median value ω

V Vapparent volume of distributionfor the central compartment

log-normal 5 0.1

κM Km

drug concentration necessary toproduce half of maximum elimi-nation rate

log-normal 1 0.1

Vmax Vmax maximum elimination rate log-normal 2 0.1

tdur D1duration of the zero-order ab-sorption

log-normal 6 0.1

tlag ALAG1lag time for the zero-order ab-sorption

log-normal 1 0.1

Table 4.8: Structural model parameters and their values used in the simulation for a one-compartment model with Michaelis-Menten elimination and zero-order absorption that hasa time lag. Please note that the “Code” column lists the corresponding notations used inTS code blocks, and the same notation is also used in NONMEM code but with all thecharacters in upper case. The “ω” column specifies the standard deviation of the logarithmof the corresponding random variables.

4.5.1 Implementation in NONMEM

This model can be directly implemented in NONMEM in the same way as the one for themodel without lag time; that is, the input rate to the central compartment is implicitlyincorporated into the model through adding a column RATE in the input dataset with itsvalue setting to be -2 in the corresponding dosing row (see Table 4.7) and then specifyingthe duration and lag time for the zero-order absorption using the reserved keywords D1 andALAG1 in the $PK block, respectively (see Appendix 4.D for the complete NONMEM codes).

4.5.2 Implementation in Trial Simulator

Implementation of the zero-order absorption model with a time lag is the same as that forthe one without a time lag, except that Steps 2, 4, and 5 are changed as below to incorporatethe time lag.

2. Create a Multivariate Distribution block to specify the structural model parameterslisted in Table 4.8 as well as the ending time for the zero-order absorption.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

Page 108: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

108 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

– Add variables to specify those structural model parameters listed in Table4.8

– Add another variable, tAbsorptionStop, to specify the ending time of thezero-order absorption. Specifically, check the “Derived” checkbox below thevariable name tAbsorptionStop, and then enter D1 + ALAG1 in the blue fieldthat appears.

• In the Continuous tab, enter the information for those structural model parame-ters based on the information provided in Table 4.8.

4. Add a Formulation block, Test_Drug, to define the delayed dosing input for the zero-order absorption. Specifically, in its property dialog box:

• Check the Lag checkbox, and enter ALAG1 in the blue field that appears.

• Do After Dose: enter the following statement in the yellow-shaded field

Input = Test_Drug/D1

5. Add another Formulation block, DummyFormulation, to change the input rate to zerowhen the zero-order absorption is over.

• Wire the tAbsorptionStop output to the first input node of DummyFormulation(i.e., the Offset Time)

• In the property of “Do Before Dose” of DummyFormulation, enter the followingstatement in the yellow-shaded field

Input = 0

Page 109: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.A. NONMEM: RESET A COMPARTMENT RIGHT AFTER EACH OBSERVATION109

4.A NONMEM Codes: A Two-Compartment Model

with Urine Comparment Reset Right After Each

Observation

$PROBLEM TWO -CPT MODEL WITH IV BOLUS AND TWO OBSERVABLES (

PLASMA AND URINE)

; ========= INPUT DATASET ====================================

$INPUT ID TIME AMT CMT DVID EVID DV

$DATA TWOCPT_IV_1STORDERELIM_PLASMAURINEOBS_SINGLEBOLUS_SIMIN.

csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP = 3

COMP = (CENTRAL)

COMP = (PERIPH)

COMP = (URINE)

; ==================== STRUCTURE MODEL PARAMETERS =============

$PK

; V = VOLUME OF DISTRIBUTION OF CENTRAL COMPARTMENT

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; CL = CLEARANCE RATE FOR THE CENTRAL COMPARTMENT

TVCL = THETA (2)

CL = TVCL * EXP(ETA(2))

; V2 = VOLUM OF DISTRIBUTION OF PERIPHERIAL COMPARTMENT

TVV2 = THETA (3)

V2 = TVV2 * EXP(ETA(3))

; CL2 = INTERCOMPARTMENTAL CLEARANCE

TVCL2 = THETA (4)

CL2 = TVCL2 * EXP(ETA(4))

; ============== INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

5 ; TVV

1 ; TVCL

Page 110: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

110 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

3 ; TVV2

0.5 ; TVCL2

$OMEGA

0.01

0.04

0.09

0.09

; ============================ ODE MODEL ====================

$DES

DADT (1) = - CL*A(1)/V - CL2*(A(1)/V - A(2)/V2)

DADT (2) = CL2*(A(1)/V - A(2)/V2)

DADT (3) = CL*A(1)/V

; ============================= RESIDUAL ERROR MODEL ==========

; INITIAL ESTIMATES FOR THE VARIANCE MATRIX (SIGMA) OF THE

RESIDUAL VARIABILITY

$SIGMA

0.01 ;PLASMA

0.04 ;URINE

; RESIDUAL ERROR MODEL

$ERROR

IF (DVID .EQ. 1) THEN

IPRED = A(1)/V

Y = IPRED *(1 + EPS(1))

ENDIF

IF (DVID .EQ. 2) THEN

IPRED = A(3)

Y = IPRED *(1 + EPS(2))

ENDIF

; REPLICATE NUMBER

REPL = IREP

; =================== RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT ==========================

$TABLE REPL ID TIME AMT IPRED DVID DV NOPRINT NOAPPEND

ONEHEADER

FILE = TWOCPT_IV_1STORDERLIM_PLASMAURINEOBS_SIMOUT

Page 111: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.B. NONMEM: PARAMETERS DISCONTINUOUSLY CHANGEDAT SPECIFIC TIMES111

$TABLE REPL ID TIME V CL V2 CL2 ONEHEADER NOPRINT NOAPPEND

FIRSTONLY

FILE = TWOCPT_IV_1STORDERLIM_PLASMAURINEOBS_POSTHOC

4.B NONMEM Codes: A First-order Absorption Model

with Absorption Rate Discontinuously Changed at

Specific Times

$PROBLEM CHANGE -POINT MODEL IMPLEMENTED USING DUMMY COMPARTMENT

$INPUT ID TIME AMT CMT ADDL II DV

$DATA

CHANGEPT_ONECPT_1STORDERABSORP_KA_DUMMYCPT_MULTIPLEBOLUS_SIMIN

.csv IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP = 3

COMP = (ABSORP)

COMP = (CENTRAL)

COMP = (CHANGE)

; ======= FLAG VARIABLES AND STRUCTURAL MODEL PARAMETERS =====

$PK

; ------- INITIALIZE AND SET FLAGE VARIABLES ------------

; INITIALIZE INORMALDOSE , IPHONYDOSE AND ICHANGEPT WHEN

SUBJECT BEGINS

IF(NEWIND .LE. 1) THEN

INORMALDOSE = 0 ; INDICATOR OF NORMAL DOSE OCCURING OR

NOT

IPHONYDOSE = 0 ; INDICATOR OF PHONY DOSE OCCURING OR NOT

ICHANGEPT = 0 ; INDICATOR OF CHANGE POINT OCCURING OR NOT

ENDIF

; SET ICHANGEPT , WHICH INDICATES WHETHER CHANGE POINT OCCURS

OR NOT

IF(INORMALDOSE .EQ. 1) ICHANGEPT = 0

IF(IPHONYDOSE .EQ. 1) ICHANGEPT = 1

; RESET INORMALDOSE AND IPHONYDOSE AFTER READING EACH

SUBSEQUENT RECORD

Page 112: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

112 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

INORMALDOSE = 0

IPHONYDOSE = 0

; SET INORMALDOSE AND IPHONYDOSE WHEN READING EACH

SUBSEQUENT RECORD

; DOSREC(AMT)always contains the amount of the most recent

dose

IF(DOSREC(AMT) .NE. 0 .AND. DOSREC(AMT) .NE. 99999)

INORMALDOSE = 1

IF(DOSREC(AMT) .EQ. 99999) IPHONYDOSE = 1

; --------STRUCTURAL MODEL PARAMETERS --------------------

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; CL = CENTRAL CLEARANCE

TVCL = THETA (2)

CL = TVCL * EXP(ETA(2))

; KA_BCHANGEPT = ABSORPRATE BEFORE CHANGE POINT

TVKA_BCHANGEPT = THETA (3)

KA_BCHANGEPT = TVKA_BCHANGEPT * EXP(ETA(3))

; KA_ACHANGEPT = ABSORPTION RATE AFTER CHANGE POINT

TVKA_ACHANGEPT = THETA (4)

KA_ACHANGEPT = TVKA_ACHANGEPT * EXP(ETA(4))

; THE TIME POINT WHERE THE CHANGE POINT OCCURS

TVALAG3 = THETA (5)

ALAG3 = TVALAG3 * EXP(ETA(5))

; KA = ABSORPTION RATE

KA = (1 - ICHANGEPT) * KA_BCHANGEPT + ICHANGEPT *

KA_ACHANGEPT

; ============= INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

100 ; TVV

10 ; TVCL

0.01 ; TVKA_BCHANGEPT

0.1 ; TVKA_ACHANGEPT

5 ; TVALAG3

$OMEGA

Page 113: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.B. NONMEM: PARAMETERS DISCONTINUOUSLY CHANGEDAT SPECIFIC TIMES113

0.01

0.01

0.01

0.01

0.01

; ============== ODE MODEL ====================================

$DES

; ABSORPTION COMPARTMENT

DADT (1) = - KA * A(1)

; CENTRAL COMPARTMENT

DADT (2) = KA * A(1) - CL/V * A(2)

; DUMMY COMPARTMENT (USED TO GET WHEN CHANGE POINT OCCURS)

DADT (3) = 0

; =============== RESIDUAL ERROR MODEL =======================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

IPRED = A(2)/V

Y = IPRED * (1 + EPS(1))

; REPLICATE NUMBER

REPL = IREP

; ================ RUNNING MODE ===============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =========================

$TABLE REPL ID TIME AMT KA IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = CHANGEPT_ONECPT_1STORDERABSORP_KA_DUMMYCPT_SIMOUT

$TABLE REPL ID TIME V CL KA_BCHANGEPT KA_ACHANGEPT ALAG3

ONEHEADER NOPRINT NOAPPEND FIRSTONLY

FILE = CHANGEPT_ONECPT_1STORDERABSORP_KA_DUMMYCPT_POSTHOC

Page 114: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

114 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

4.C NONMEM Codes: A Zero-order Absorption Model

without Time Lag

$PROBLEM ONE -CPT MODEL WITH 0-ORDER ABSORPTION AND MICHAELIS -

MENTEN ELIMINATION

$INPUT ID TIME AMT CMT RATE DV

$DATA ONECPT_0ORDERABSORPAMTDUR_MMELIM_SINGLEBOLUS_SIMIN.csv

IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP=1

COMP = (CENTRAL)

; =============== STRUCTURE MODEL PARAMETERS ===============

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KM = HALF SATURATION CONSTANT

TVKM = THETA (2)

KM = TVKM * EXP(ETA(2))

; VMAX = MAXIMUM ELIMINATION RATE

TVVMAX = THETA (3)

VMAX = TVVMAX * EXP(ETA(3))

; DURATION FOR THE ZERO -ORDER ABSORPTION PROCESS

TVD1 = THETA (4)

D1 = TVD1 * EXP(ETA(4))

; ============= INITIAL VALUES FOR THETA AND OMEGA ==========

$THETA

5 ;TVV

1 ;TVKM

2 ;TVVMAX

6 ;TVD1

$OMEGA

0.01 ;ETA V

Page 115: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.D. NONMEM: A ZERO-ORDER ABSORPTION MODEL WITH TIME LAG 115

0.01 ; ETA KM

0.01 ; ETA VMAX

0.01 ; ETA D1

; ============== ODE model ====================================

$DES

DADT (1) = -VMAX*A(1)/(KM*V + A(1))

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

IPRED = A(1)/V

Y = IPRED *(1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_0ORDERABSORPNOTLAG_MMELIM_SIMOUT

$TABLE REPL ID TIME V KM VMAX D1 ONEHEADER NOPRINT NOAPPEND

FIRSTONLY

FILE = ONECPT_0ORDERABSORPNOTLAG_POSTHOC

4.D NONMEM Codes: A Zero-order Absorption Model

with Time Lag

$PROBLEM ONE -CPT MODEL WITH 0-ORDER ABSORPTION AND MICHAELIS -

MENTEN ELIMINATION

$INPUT ID TIME AMT CMT RATE DV

$DATA ONECPT_0ORDERABSORPAMTDUR_MMELIM_SINGLEBOLUS_SIMIN.csv

IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

Page 116: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

116 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

$MODEL

NCOMP=1

COMP = (CENTRAL)

; =============== STRUCTURE MODEL PARAMETERS =================

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KM = HALF SATURATION CONSTANT

TVKM = THETA (2)

KM = TVKM * EXP(ETA(2))

; VMAX = MAXIMUM ELIMINATION RATE

TVVMAX = THETA (3)

VMAX = TVVMAX * EXP(ETA(3))

; DURATION FOR THE ZERO -ORDER ABSORPTION PROCESS

TVD1 = THETA (4)

D1 = TVD1 * EXP(ETA(4))

; TIME LAG FOR THE ZERO -ORDER ABSORPTION PROCESS

TVALAG1 = THETA (5)

ALAG1 = TVALAG1 * EXP(ETA(5))

; ============= INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

5 ;TVV

1 ;TVKM

2 ;TVVMAX

6 ;TVD1

1 ;TVALAG1

$OMEGA

0.01 ;ETA V

0.01 ; ETA KM

0.01 ; ETA VMAX

0.01 ; ETA D1

0.01 ; ETA ALAG1

; ============== ODE model ====================================

$DES

Page 117: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

4.D. NONMEM: A ZERO-ORDER ABSORPTION MODEL WITH TIME LAG 117

DADT (1) = -VMAX*A(1)/(KM*V + A(1))

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

IPRED = A(1)/V

Y = IPRED *(1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_0ORDERABSORPTLAG_MMELIM_SIMOUT

$TABLE REPL ID TIME V KM VMAX D1 ALAG1 ONEHEADER NOPRINT

NOAPPEND FIRSTONLY

FILE = ONECPT_0ORDERABSORPTLAG_MMELIM_POSTHOC

Page 118: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

118 CHAPTER 4. MODELS WITH DISCONTINUOUS ACTIONS

Page 119: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

Chapter 5

Models with Double AbsorptionPathways

5.1 Introduction

Many drugs can be described by either a first-order or zero-order absorption model. However,in some cases, after extravascular administration, the plasma concentration-time profilesexhibit a double- or multiple-peak phenomenon. One explanation for this phenomenon isthat there may be multiple distinct sites of absorption (e.g., see [17, 18, 19]). For example, ithas been recognized for many years that there exists two absorption pathways (through theblood and lymph capillaries) for large molecules after injection into the interstitial space.

Here we consider two types of models that are often used in the literature to model the doubleabsorption phenomenon. One type is models with two first-order absorption pathways, andthe other is with mixed first-order and zero-order absorption pathways. Please note thatthe techniques used in implementing these models can be easily extended to the multiple-absorption-pathway case. In addition, for simplicity, all the examples are demonstrated usingone-compartment models.

5.1.1 Models with Two First-order Absorption Pathways

Models with two first-order absorption pathways have been found to adequately describedouble-peak absorption profiles of a number of compounds following extravascular admin-istration such as ibuprofen effervescent granules, and lidocaine and bupivacaine followingepidural administration (e.g., see [16] for details). Typically, for this type of models, it isassumed that one process starts at time 0 and the other one starts at a later time (estimatedthrough the data). In this case, they are often referred to as parallel first-order absorptionmodels . While, in the case where both processes start at the same time, 0, they are often

119

Page 120: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

120 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

referred to as simultaneous first-order absorption models .

In this chapter, we will consider three such examples, where the first two are for simultane-ous first-order absorption models with either first-order clearance rate or Michaelis-Mentenelimination, and the last one is for a parallel first-order absorption model. For convenience,all the possible model parameters for these three examples are summarized in Table 5.1.

Param Code Meaning Distribution Median value ω

V Vvolume of distribution forthe central compartment

log-normal 5 0.1

Cl Cl central clearance rate log-normal 1 0.1

κM Km

drug concentration neces-sary to produce half of themaximum elimination rate

log-normal 1 0.1

Vmax Vmax maximum elimination rate log-normal 2 0.1

κa,1 Ka1first-order absorption ratefor the first pathway

log-normal 0.5 0.1

κa,2 Ka2first-order absorption ratefor the second pathway

log-normal 1.5 0.1

tlag ALAG2delay time for the secondpathway

log-normal 1 0.1

logit(f1) logitF1

logit of the fraction of doseabsorbed in the first path-way

constant 0.1

f1 F1fraction of dose absorbed inthe first pathway

constantexp(logit(f1))

1 + exp(logit(f1))

Table 5.1: Structural model parameters and their values used in the simulation for modelswith two first-order absorption pathways. Please note that the “Code” column lists thecorresponding notations used in TS code blocks, and the same notation is also used inNONMEM code but with all the characters in upper case. The “ω” column specifies thestandard deviation of the logarithm of the corresponding random variables.

5.1.2 Mixed First-order and Zero-order Absorption Models

Mixed first-order and zero-order absorption models are another widely used model type todescribe the atypical absorption profiles. For example, it was successfully used in [20] to

Page 121: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.1. INTRODUCTION 121

describe the absorption profile of cefetamet pivoxil following oral administration. Basedon whether the first-order and zero-order absorption processes start at the same time ornot, the resulting model is sometimes referred to as a simultaneous or sequential first-orderand zero-order absorption model . As remarked in [19], the ordering of these two processesis usually empirical or data driven, and may be determined based on the pathophysiologyand/or physiochemical characteristics of the compound.

In this chapter, we consider three such examples. One is a model with simultaneous first-order and zero-order absorption, and the other two examples are for models with sequentialfirst-order and zero-order absorption with the first-order process starting either before orafter the zero-order one. For convenience, all the possible model parameters for all the mixedfirst-order and zero-order absorption models considered in this chapter are summarized inTable 5.2 as well as their distributions and values used in the simulation.

Param Code Meaning Distribution Median value ω

V Vvolume of distribution forthe central compartment

log-normal 5 0.1

Cl Cl central clearance rate log-normal 1 0.1

κa Ka first-order absorption rate log-normal 2.5 0.1

tlag

ALAG1delay time for the first-order absorption process log-normal 2 0.1

ALAG2delay time for the zero-order absorption process

tdur D2duration of the zero-orderabsorption process

log-normal 6 0.1

logit(f1) logitF1

logit of the fraction of doseabsorbed in the first-orderprocess

constant 0.1

f1 F1fraction of dose absorbed inthe first-order process

constantexp(logit(f1))

1 + exp(logit(f1))

Table 5.2: Structural model parameters and their values used in the simulation for mixedfirst-order and zero-order absorption models. Please note that the “Code” column liststhe corresponding notations used in TS code blocks, and the same notation is also used inNONMEM code but with all the characters in upper case. The “ω” column specifies thestandard deviation of the logarithm of the corresponding random variables.

Page 122: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

122 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

5.2 A Simultaneous First-order Absorption Model

In this section, we demonstrate how to implement a simultaneous first-order absorptionmodel through two examples, one is with a first-order clearance rate, and the other one is forMichaelis-Menten elimination. For both examples, differential equations are explicitly spec-ified through the $DES block in NONMEM, and implicitly specified through compartmentand flow blocks in TS.

5.2.1 First-order Clearance Rate

Here we consider a simultaneous first-order absorption model with a first-order clearance ratefrom the central compartment. Figure 5.1 depicts the schematic representation of this model,where Aa,1, Aa,2, and A are the amount of drug at the first absorption compartment, thesecond absorption compartment, and the central compartment, respectively; f1 denotes thefraction of dose absorbed in the first pathway; κa,1 and κa,2 denote the first-order absorptionrate for the first and second pathway, respectively; and cl is the central clearance rate withV being the volume of distribution for the central compartment.

Dose

Aa,1 Aa,2

A

f1 1− f1

κa,1 κa,2

clV

Figure 5.1: Schematic representation of a one-compartment model with simultaneous first-order absorption. Here Aa,1, Aa,2, and A denote the amount of drug at the first absorptioncompartment, the second absorption compartment, and the central compartment, respec-tively. Parameter, f1, represents the fraction of dose absorbed in the first pathway. Inaddition, κa,1 and κa,2 denote the first-order absorption rate for the first and second path-way, respectively. Parameter cl is the central clearance rate with V being the volume ofdistribution for the central compartment.

Page 123: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.2. A SIMULTANEOUS FIRST-ORDER ABSORPTION MODEL 123

The corresponding system of ODEs is given as follows:

Aa,1 = −κa,1Aa,1,

Aa,2 = −κa,2Aa,2,

A = κa,1Aa,1 + κa,2Aa,2 −clVA,

(5.1)

where A(0) = 0. The dose enters into the system through initial conditions for Aa,1 andAa,2. For example, if a single bolus is administered at time 0 with dose D, then

Aa,1(0) = f1D, Aa,2(0) = (1− f1)D.

Implementation in NONMEM. Again, the dosing information is implicitly incorpo-rated into the model without the need to explicitly specify the initial conditions for Aa,1 andAa,2. To split the dose between the two absorption compartments, ones uses the CMT to putthe scheduled dose to each of these compartments, and then uses the reserved variables F1

and F2 in the $PK block to achieve this. Specifically, system (5.1) is explicitly specified inNONMEM through the $DES block as follows:

$DES

;1ST ABSORPTION COMPARTMENT

DADT (1) = -KA1*A(1)

;2ND ABSORPTION COMPATMENT

DADT (2) = -KA2*A(2)

;CENTRAL COMPARTMENT

DADT (3) = KA1*A(1) + KA2*A(2) - CL/V*A(3)

And the dosing information is implicitly incorporated into the system through the followingsteps.

• In the input dataset, the scheduled dosing amount should be administered to bothabsorption compartments at the schedule dosing time points (see the highlighted rowin Table 5.3 for an example where a single bolus is administered at time 0 with doseD = 10).

• In the $PK block, the fraction of dose absorbed for the first and second pathways arespecified through the reserved variables F1 and F2, respectively (see Appendix 5.A.1for the complete NONMEM codes).

Page 124: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

124 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

CID TIME AMT CMT DV

1 0.00 10 1 .

1 0.00 10 2 .

1 0.50 . . .

1 1.00 . . .

1 2.00 . . .

1 4.00 . . .

Table 5.3: A fragment of the input dataset for models with two first-order absorption path-ways in the case where a single bolus dose is administered at time 0 with dose D = 10.

Implementation in TS. In TS, each formulation represents one point of dose input,and hence it can only be dosed to a specific compartment. However, for this example,because both first-order absorption processes start at the same time, one can still use theinvolved formulation, Test_Drug, to administer the dose to both absorption compartmentsthrough its properties “Dose to” and “Do After Dose”. Specifically, the “Dose to” propertyof Test_Drug is used to specify the compartment to which the dose is administered in thefirst pathway, and the property “Do After Dose” is then used to explicitly administer thedose to the second absorption compartment (see Figure 5.2).

Figure 5.2: The block properties of Test_Drug for a one-compartment model with simulta-neous first-order absorption.

Page 125: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.2. A SIMULTANEOUS FIRST-ORDER ABSORPTION MODEL 125

Please note that the dose administered to each of these absorption compartments is thefull scheduled dose instead of a fraction of the dose. Hence, the input rate to the centralcompartment due to the first pathway should be f1κa,1Aa,1 (due to the linearity of the ODEfor Aa,1) instead of κa,1Aa,1, and the one for the second pathway should be (1− f1)κa,2Aa,2(due to the linearity of the ODE for Aa,2) instead of κa,2Aa,2. This is achieved throughthe property “F (Bioavailability)” of the Flow block from the corresponding absorptioncompartment to the central compartment (see Figure 5.3).

Figure 5.3: The block properties of the Flow blocks for a one-compartment model withsimultaneous first-order absorption: (left panel) properties for the flow from the first absorp-tion compartment to the central compartment; (right panel) properties for the flow from thesecond absorption compartment to the central compartment, where F2 = 1 - F1.

For convenience, the key steps to implement this model in TS are summarized below.

1. Add a one-compartment model with two first-order absorption pathways.

• Add an Absorption Compartment block (called Abs1).

• Add a second Absorption Compartment block (called Abs2).

• Add a Central Compartment block below the Absorption Compartment blocks.

• Add an Elimination Compartment block below the Central Compartment block.

• Add a flow between the first absorption compartment, Abs1, and central com-partment (called Ka1Param).

• Add a flow between the second absorption compartment, Abs2, and the centralcompartment (called Ka2Param).

• Add a flow between the central and elimination compartments (called CL0).

Page 126: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

126 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

2. Add a Formulation block, Test_Drug, to specify the compartment to which the doseis administered in the first pathway as well as defining the dosing input for the secondpathway. Specifically, in its property dialog box, enter the following information:

(a) Dose to: choose Abs. Cpt.:Abs1 from the drop-down list.

(b) Do After Dose: enter the following statement in the yellow-shaded field to specifythe dosing input for the second pathway

Aa2 = Aa2 + Test_Drug

3. Enter the fraction of the dose that is absorbed as well as the absorption rate for eachpathway.

(a) Add a Multivariate Distribution block to specify the fraction of the dose that isabsorbed as well as the absorption rate for the first pathway.

• In the Parameter tab of its property dialog box,

– Choose “subject param” from the drop-down list of the Level field.

– Add variable logitF1.

– Add variable F1, check the “Derived” checkbox below the variable name,and then enter exp(logitF1)/(1 + exp(logitF1))) in the blue fieldthat appears.

– Add variable Ka1.

• In the Continuous tab, enter the information for logitF1 and Ka1 based onthe information provided in Table 5.1.

(b) In the property dialog box for Ka1Param (the flow between the first absorptioncompartment and the central compartment), enter the following information:

• Check the “F (Bioavailability)” checkbox, and then wire F1 to the first inputnode of Ka1Param.

• Wire Ka1 output to the second input node of Ka1Param.

(c) Add a Multivariate Distribution block to specify the fraction of the dose that isabsorbed as well as the absorption rate for the second pathway.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variable F2, check the “Derived” checkbox below the variable name,and then enter 1 - F1 in the blue field that appears.

– Add variable Ka2.

• In the Continuous tab, enter the information for Ka2 based on the informationprovided in Table 5.1.

(d) In the property dialog box for Ka2Param (the flow between the second absorptioncompartment and the central compartment), enter the following information:

• Check the “F (Bioavailability)” checkbox, and then wire F2 to the first inputnode of Ka2Param.

Page 127: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.2. A SIMULTANEOUS FIRST-ORDER ABSORPTION MODEL 127

• Wire Ka2 output to the second input node of Ka2Param.

4. Enter the central clearance rate as well as the volume of distribution for the centralcompartment.

• Add a Multivariate Distribution block to specify the central clearance rate as wellas the volume of distribution for the central compartment.

– In the Parameter tab, add variables V and Cl, and choose “subject param”from the drop-down list of the Level field.

– In the Continuous tab, enter the information for V and Cl based on theinformation provided in Table 5.1.

• Wire V output to the first input node of the central compartment.

• Wire Cl output to the second input node of CL0 (the flow between the centraland elimination compartments).

5. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule as planned.

The completed structural model is shown in Figure 5.4.

Figure 5.4: The completed model in TS for a one-compartment model with simultaneousfirst-order absorption and first-order clearance rate from the central compartment.

Page 128: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

128 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

5.2.2 Michaelis-Menten Elimination

Here we consider a simultaneous first-order absorption model with Michaelis-Menten elimi-nation from the central compartment. The model is the same as that given in (5.1) exceptthat the first-order clearance term is replaced with the Michaelis-Menten elimination; thatis, the system of ODEs is given as follows:

Aa,1 = −κa,1Aa,1,

Aa,2 = −κa,2Aa,2,

A = κa,1Aa,1 + κa,2Aa,2 −VmaxA

κMV + A.

(5.2)

Implementation in NONMEM. This model can be implemented in NONMEM in thesame way as that for (5.1) except that the first-order clearance term in the central compart-ment is replaced with the Michaelis-Menten elimination. The complete NONMEM codes aregiven in Appendix 5.A.2.

Implementation in TS. Implementation of this model in TS is same as the one for thefirst-order clearance rate except that Step 4 is changed as follows:

4. Specify Michaelis-Menten elimination information.

• Add a Multivariate Distribution block to specify the apparent volume for thecentral compartment (V), the maximum elimination rate (Vmax), and the drugconcentration necessary to produce half of the maximum elimination rate (Km).

– In the Parameter tab, add variables V, Vmax, and Km, and choose “subjectparam” from the drop-down list of the Level field.

– In the Continuous tab, enter the information for V, Vmax, and Km based onthe information provided in Table 5.1.

• Wire V output to the first input node of the central compartment.

• In the property dialog box for CL0 (the flow between the central and eliminationcompartments), check the “Saturating” radio button.

• Wire Vmax output to the second input node of CL0.

• Wire Km output to the third input node of CL0.

The completed structural model is shown in Figure 5.5.

Page 129: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.3. A PARALLEL FIRST-ORDER ABSORPTION MODEL 129

Figure 5.5: The completed model in TS for a one-compartment model with simultaneousfirst-order absorption and Michaelis-Menten elimination from the central compartment.

5.3 A Parallel First-order Absorption Model

In this section, we demonstrate how to implement a parallel first-order absorption model.The model is the same as that given in (5.1) except that there is a time lag for the secondpathway.

Implementation in NONMEM. This model can be implemented in NONMEM in thesame way as that for the simultaneous first-order absorption model with the first-orderclearance rate, (5.1), except that one also needs to specify the lag time for the second first-order absorption process through the reserved ALAG2 in the $PK block (see Appendix 5.B forthe complete NONMEM codes).

Implementation in TS. Since the second absorption pathway starts later than the firstone, the trick used in the above section for the simultaneous first-order absorption modelcannot be used here to administer the dose to both absorption compartments. A way toachieve this is to use the property “Dose to” of Test_Drug to administer the dose to thefirst absorption compartment, and then create a dummy formulation, Rep_Test_Drug, that

Page 130: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

130 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

has the same dosing schedules and amount as Test_Drug, and use its properties “Dose to”and “Lag” to administer the dose to the second absorption compartment and define its lagtime, respectively (see Figure 5.6).

Figure 5.6: The block properties of Test_Drug (left panel) and Rep_Test_Drug (right panel)for a one-compartment model with parallel first-order absorption.

Below are the steps to implement this model in TS using the method of compartment andflow blocks: first, follow the same steps as those to implement (5.1) except delete Step 2(b)and add variable ALAG2 in Step 3(c) to incorporate the lag time for the second pathway; andthen add the following two steps:

6. Add another Formulation block, Rep_Test_Drug, to specify the compartment to whichthe dose is administered for the second pathway as well as defining its lag time. Specif-ically, in its property dialog box, enter the following information:

• Dose to: choose Abs. Cpt.:Abs2 from the drop-down list.

• Check the “Lag” checkbox, and enter ALAG2 (tlag) in the blue field that appears.

7. In the Treatments page, add formulation Rep_Test_Drug in each Treatment Arm thatis considered.

• Set the dose to be the same as the formulation Test_Drug.

• Set the schedule to be the same as that for the true formulation Test_Drug.

The completed structural model is shown in Figure 5.7.

Page 131: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.4. SIMULTANEOUS FIRST- AND ZERO-ORDER ABSORPTION 131

Figure 5.7: The completed model in TS for a one-compartment model with parallel first-orderabsorption and first-order clearance from the central compartment.

5.4 A Simultaneous First-order and Zero-order Ab-

sorption Model

In the rest of this chapter, we start demonstrating how to implement mixed first-orderand zero-order absorption models through three examples. For all of these examples, theclearance rate from the central compartment is assumed to be first-order. In addition,differential equations are explicitly specified through the $DES block in NONMEM and theProcedure block in TS. For simplicity, all the examples are demonstrated using a single-dosing-event case (a single bolus is administered at time 0 with dose D). Please note thatthe techniques used to implement these models are also applicable to the multiple-dosing-event case.

The first example is a simultaneous first-order and zero-order absorption model given by

Aa(t) = −κaAa(t),

A(t) = Input(t) + κaAa(t)−clVA(t).

(5.3)

Here Aa and A denote the amount of drug at the first-order absorption compartment andthe central compartment, respectively, κa is the first-order absorption rate, cl is the centralclearance rate, and V is the apparent volume of distribution for the central compartment.In addition, Input(t) denotes the input rate (amount per unit of time) of the drug into the

Page 132: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

132 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

central compartment at time t due to zero-order absorption, and is given by

Input(t) =

(1− f1)

D

tdur

, 0 ≤ t ≤ tdur,

0, Otherwise,

(5.4)

where f1 is the fraction of the dose absorbed in the first-order absorption pathway, and tdur

denotes the duration of the zero-order absorption. The initial condition for A is zero (thatis, A(0) = 0), and the fraction of the dose absorbed in the first-order absorption pathwayenters into the system through the initial condition for Aa (that is, Aa(0) = f1D).

5.4.1 Implementation in NONMEM

Again, model (5.3) can be directly implemented in NONMEM without the need to explicitlyspecify the input rate to the central compartment as well as the initial condition to thedosing compartment Aa. Specifically, (5.3) is specified in $DES block as follows:

$DES

; ABSORPTION COMPARTMENT FOR THE 1ST -ORDER PROCESS

DADT (1) = -KA * A(1)

;CENTRAL COMPARTMENT

DADT (2) = KA * A(1) - CL / V * A(2)

The input rate to the central compartment due to the zero-order absorption pathway (thatis, Input defined in (5.4)), is implicitly incorporated into the model through the followingsteps:

• In the input dataset, one adds a column RATE with its value setting to be -2 in thecorresponding dosing rows for the central compartment (see the highlighted row incyan color in Table 5.4 for an example where a single bolus dose is administered attime 0 with dose D = 10).

• In the $PK block, the duration as well as the fraction of the dose absorbed for thezero-order absorption pathway is specified through the reserved variables D2 and F2,respectively.

And the fraction of the dose absorbed in the first-order absorption pathway is implicitlyincorporated into the model through the input dataset (see the highlighted row in grey colorin Table 5.4) as well as the reserved variable F1 in the $PK block (see Appendix 5.C for thecomplete NONMEM codes).

Page 133: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.4. SIMULTANEOUS FIRST- AND ZERO-ORDER ABSORPTION 133

CID TIME AMT CMT RATE DV

1 0.00 10 1 . .

1 0.00 10 2 -2 .

1 0.50 . . . .

1 1.00 . . . .

1 2.00 . . . .

1 4.00 . . . .

Table 5.4: A fragment of the input dataset for mixed first-order and zero-order absorptionmodels in the case where a single bolus dose is administered at time 0 with dose D = 10:RATE = -2 means that the duration will be specified in the $PK block.

5.4.2 Implementation in Trial Simulator

Because the zero-order absorption process starts at the same time as the first-order ab-sorption process, one can use the property “Do After Dose” of the involved formulation,Test_Drug, to define the dosing inputs for both processes. This is done through explicitlydefining the nonzero input rate to the central compartment (due to the zero-order absorp-tion process) as well as the initial condition to the dosing compartment Aa (see Figure 5.8).Again, to change the value of the input rate to zero when the zero-order absorption is over,

Figure 5.8: The block properties of Test_Drug for a one-compartment model with simulta-neous first-order and zero-order absorption.

Page 134: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

134 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

we use a dummy formulation, DummyFormulation, with its properties “Offset Time” and“Do Before Dose” to achieve this (see Figure 5.9).

Figure 5.9: The block properties of DummyFormulation for a one-compartment model withsimultaneous first-order and zero-order absorption.

For convenience, the key steps to implement this model in TS are summarized below.

1. Add a Model Variable block to define the input rate, Input, to the central compartmentdue to the zero-order absorption process. In its property dialog box,

• Add a variable, Input, and then set its “Default Value” to be zero.

2. Add a Multivariate Distribution block and enter the following information in its prop-erty dialog box to specify the inter-individual variability for the model parameters.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Cl, Ka, D2, and logitF1 (see Table 5.2 for their meanings).

– Add variable F1, and check the “Derived” checkbox below the variable name,and then enter exp(logitF1)/(1 + exp(logitF1)) in the blue field thatappears.

Page 135: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.5. FIRST-ORDER PROCESS FOLLOWED BY ZERO-ORDER PROCESS 135

• In the Continuous tab, enter the information for V, Cl, Ka, D2, and logitF1 basedon the information provided in Table 5.2.

3. Add a Procedure block to specify the system of ODEs (5.3). In its property dialogbox, perform the following:

• In the Integrator Variables tab, add integrator variables Aa and A.

• In the Code tab,

– Integrator initialization per subject: enter 0 in each of blue-shaded fields.

– Differential equation(s): enter the following expression

-Ka*Aa

in the blue-shaded field for “Aa'=”, and enter

Input + Ka*Aa - Cl/V*A

in the blue-shaded field for “A'=”.

4. Add a Formulation block, Test_Drug, to define the dosing input from both pathways.Specifically, in its property dialog box,

• Do After Dose: enter the following two statements in the yellow-shaded field

Aa = Aa + F1 * Test_Drug; Input = (1 - F1)*Test_Drug/D2

5. Add another Formulation block, DummyFormulation, to change the input rate to zerowhen the zero-order absorption is over.

• Wire the D2 (tdur) output to the first input node of DummyFormulation (i.e., theOffset Time).

• In the property “Do Before Dose” of DummyFormulation, enter Input = 0 in theyellow-shaded field.

6. In the Treatments page, add DummyFormulation in each of the Treatment Arms con-sidered.

• Set the dose to be any valid number (such as 99999 used in the example),

• Set the schedule to be the same as that for the true formulation Test_Drug.

5.5 A Sequential First-order and Zero-order Absorp-

tion Model with the First-order Process Followed

by the Zero-order Process

In this section, we demonstrate how to implement a sequential first-order and zero-orderabsorption model. The mode is the same as that for the simultaneous first-order and zero-order absorption model, except there is a time lag for the zero-order absorption process; that

Page 136: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

136 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

is, the model is still described by the system of ODEs (5.3), but the input rate is changed to

Input(t) =

(1− f1)

D

tdur

, tlag ≤ t ≤ tdur + tlag,

0, otherwise,

(5.5)

where tlag denotes the delay time for the zero-order absorption process.

Implementation in NONMEM. This model can be implemented in NONMEM in thesame way as that for the simultaneous first-order and zero-order absorption model, exceptthat one also needs to specify the lag time for the zero-order absorption process. This canbe achieved through the reserved variable ALAG2 in the PK block (see Appendix 5.D for thecomplete NONMEM codes).

Implementation in TS. Because the zero-order absorption pathway starts later than thefirst-order absorption pathway, we cannot apply the trick used in the previous section forthe simultaneous first-order and zero-order absorption model to define the dosing inputsfor both pathways. A way to achieve this is through creating two dummy formulations.Specifically, the delayed dosing input (that is, the nonzero input defined in (5.5)) from thezero-order absorption process is explicitly defined through creating a dummy formulation,Rep_Test_Drug, that has the same dosing schedules and amount as Test_Drug, and thenusing its properties “Offset Time” and “Do After Dose” (see the left panel of Figure 5.10).

Figure 5.10: The block properties of Rep_Test_Drug (left panel) and DummyFormulation

(right panel) for a one-compartment model with sequential first-order and zero-order ab-sorption.

We then create another dummy formulation, DummyFormulation, that has the same dosingschedules as Test_Drug, and use its properties “Offset Time” and “Do Before Dose” tochange the value of the input rate to zero when the zero-order absorption is over (see the

Page 137: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.5. FIRST-ORDER PROCESS FOLLOWED BY ZERO-ORDER PROCESS 137

right panel of Figure 5.10). For the first-order absorption pathway, the property “Dose to” ofTest_Drug is used to administer the dose to the first-order absorption compartment, Aa (seethe left panel of Figure 5.11). It is worth noting that the dose administered this way to Aais the full scheduled dose instead of a fraction of the dose. Hence, the corresponding inputrate to the central compartment (that is, the input rate due to the first-order absorptionprocess) should be f1κaAa (due to the linearity of the ODE for Aa) instead of κaAa (see theright panel of Figure 5.11 for the corresponding changes made to the right-hand side of theODE for the central compartment).

Figure 5.11: The block properties of Test_Drug (left panel) and the Procedure block (rightpanel) for a one-compartment model with sequential first-order and zero-order absorption.

For convenience, the key steps in implementing this model in TS are summarized below.

1. Add a Model Variable block to define the input rate, Input, to the central compartmentdue to the zero-order absorption process. In its property dialog box:

• Add a variable, Input, and then set its “Default Value” to be zero.

2. Create a Multivariate Distribution block to specify the inter-individual variability forthe model parameters.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Cl, Ka, D2, and logitF1 (see Table 5.2 for their meanings).

– Add variable F1, and check the “Derived” checkbox below the variable name,and then enter exp(logitF1)/(1 + exp(logitF1)) in the blue field thatappears.

– Add variable ALAG2 to define the lag time for the zero-order absorption pro-cess.

Page 138: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

138 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

– Add another variable, tAbsorptionStop, to specify the ending time of thezero-order absorption. Specifically, check the “Derived” checkbox below thevariable name tAbsorptionStop, and then enter D2 + ALAG2 in the blue fieldthat appears.

• In the Continuous tab, enter the information for V, Cl, Ka, D2, logitF1, andALAG2 based on the information provided in Table 5.2.

3. Add a Procedure block to specify the system of ODEs (5.3). Specifically, in its propertydialog box, perform the following:

• In the Integrator Variables tab, add integrator variables Aa and A.

• In the Code tab,

– Integrator initialization per subject: enter 0 in each of blue-shaded fields.

– Differential equation(s): enter the following expression

-Ka*Aa

in the blue-shaded field for “Aa'=”, and enter

Input + F1*Ka*Aa - Cl/V*A

in the blue-shaded field for “A'=”.

4. Add a Formulation block, Test_Drug, to specify the compartment to which the dose isadministered for the first-order absorption pathway. Specifically, in its property dialogbox,

• Dose to: choose Variable: Aa from the drop-down list.

5. Add another Formulation block, Rep_Test_Drug, to define the delayed dosing inputfor the zero-order absorption pathway.

• Wire the ALAG2 output to the first input node of Rep_Test_Drug (i.e., the OffsetTime).

• In the property “Do After Dose” of Rep_Test_Drug, enter the following statementin the yellow-shaded field

Input = (1 - F1)*Rep_Test_Drug/D2

6. Add a third Formulation block, DummyFormulation, to change the input rate to zerowhen the zero-order absorption is over.

• Wire the tAbsorptionStop output to the first input node of DummyFormulation(i.e., Offset Time).

• In the property “Do Before Dose” of DummyFormulation, enter the following state-ment in the yellow-shaded field

Input = 0

7. In the Treatments page, add Test_Drug in each Treatment Arm that is considered,and then specify the dose and schedule as planned.

Page 139: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.6. ZERO-ORDER PROCESS FOLLOWED BY FIRST-ORDER PROCESS 139

8. In the Treatments page, add formulation Rep_Test_Drug in each of the TreatmentArms considered.

• Set the dose to be the same as the formulation Test_Drug.

• Set the schedule to be the same as that for the true formulation Test_Drug.

9. In the Treatments page, add formulation DummyFormulation in each of the TreatmentArms considered.

• Set the dose to be any valid number (such as 99999 used in the example).

• Set the schedule to be the same as that for the true formulation Test_Drug.

5.6 A Sequential First-order and Zero-order Absorp-

tion Model with the Zero-order Process Followed

by the First-order Process

In this section, we demonstrate how to implement a sequential first-order and zero-orderabsorption model with the first-order process starting later than the zero-order one. Specif-ically, the model is still described by the system of ODEs (5.3) with the input rate given by(5.4), but there is a lag time for the first-order absorption process.

Implementation in NONMEM. This model can be implemented in NONMEM in thesame way as that for the simultaneous first-order and zero-order absorption model, exceptthat one also needs to specify the lag time for the first-order absorption process throughthe reserved variable ALAG1 in the $PK block (see Appendix 5.E for the complete NONMEMcodes).

Implementation in TS. Implementation of this model is the same as the one in thesection above for the model with the zero-order process starting later than the first-orderprocess, except Steps 2, 4, 5, and 6 are changed as below to reflect that the zero-orderabsorption process starts before the first-order process.

2. Create a Multivariate Distribution block to specify the inter-individual variability forthe model parameters.

• In the Parameter tab,

– Choose “subject param” from the drop-down list of the Level field.

– Add variables V, Cl, Ka, D2, and logitF1 (see Table 5.2 for their meanings).

Page 140: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

140 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

– Add variable F1, and check the “Derived” checkbox below the variable name,and then enter exp(logitF1)/(1 + exp(logitF1)) in the blue field thatappears.

– Add variable ALAG1 to define the lag time for the first-order absorption pro-cess.

• In the Continuous tab, enter the information for V, Cl, Ka, D2, logitF1, andALAG1 based on the information provided in Table 5.2.

4. Add a Formulation block, Test_Drug, to specify the compartment to which the doseis administered for the first-order absorption pathway as well as defining the lag time.Specifically, in its property dialog box, perform the following:

• Dose to: choose Variable: Aa from the drop-down list.

• Check the Lag checkbox, and enter ALAG1 in the blue-shaded field.

5. Add another Formulation block, Rep_Test_Drug, to define the dosing input for thezero-order absorption pathway.

• In the property “Do After Dose” of Rep_Test_Drug, enter the following statementin the yellow-shaded field

Input = (1 - F1)*Rep_Test_Drug/D2

6. Add a third Formulation block, DummyFormulation, to change the input rate to zerowhen the zero-order absorption is over.

• Wire the D2 output to the first input node of DummyFormulation (i.e., OffsetTime).

• In the property “Do Before Dose” of DummyFormulation, enter the following state-ment in the yellow-shaded field:

Input = 0

Page 141: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.A. NONMEM: A SIMULTANEOUS FIRST-ORDER ABSORPTION MODEL 141

5.A NONMEM Codes: A Simultaneous First-order Ab-

sorption Model

5.A.1 First-order Clearance Rate

$PROBLEM ONE -CPT WITH TWO SIMULTANEOUS FIRST -ORDER ABSORPTION

AND FIRST -ORDER ELIMINATION

$INPUT ID TIME AMT CMT DV

$DATA ONECPT_TWO1STORDERABSORP_SINGLEBOLUS_SIMIN.csv IGNORE=C

$SUB ADVAN6 TOL = 6

$MODEL

NCOMP = 3

COMP = (ABSORB1)

COMP = (ABSORB2)

COMP = (CENTRAL)

; ============= STRUCTURE MODEL PARAMETERS ===================

$PK

;V = VOLUME DISTRIBUTION FOR CENTRAL COMPARTMENT

TVV = THETA (1)

V = TVV * EXP(ETA (1))

;CL = CENTRAL CLEARANCE RATE

TVCL = THETA (2)

CL = TVCL * EXP(ETA(2))

;KA1 = ABSORPTION RATE FOR THE 1ST PROCESS

TVKA1 = THETA (3)

KA1 = TVKA1 * EXP(ETA(3))

;KA2 = ABSORPTION RATE FOR THE 2ND PROCESS

TVKA2 = THETA (4)

KA2 = TVKA2 * EXP(ETA(4))

; F1 = FRACTION OF DOSE ABSORBED IN THE 1ST PROCESS

TVLOGITF1 = THETA (5)

LOGITF1 = TVLOGITF1

Page 142: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

142 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

F1 = EXP(LOGITF1)/(1 + EXP(LOGITF1))

; F2 = FRACTION OF DOSE ABSORBED IN THE 2ND PROCESS

F2 = 1-F1

; ================ INITIAL VALUES FOR THETA AND OMEGA ========

$THETA

5 ;TVV

1 ;TVCL

0.5 ;TVKA1

1.5 ;TVKA2

0.1 ;TVLOGITF1

; OMEGA MATRIX

$OMEGA

0.01 ; ETA V

0.01 ; ETA CL

0.01 ; ETA KA1

0.01 ; ETA KA2

; ================ ODE MODEL ================================

$DES

DADT (1) = -KA1*A(1) ;1ST ABSORPTION COMPARTMENT

DADT (2) = -KA2*A(2) ;2ND ABSORPTION COMPATMENT

DADT (3) = KA1*A(1) + KA2*A(2) - CL/V*A(3) ;CENTRAL

COMPARTMENT

; =============== RESIDUAL ERROR MODEL ======================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA 0.01

; RESDIUAL ERROR MODEL

$ERROR

IPRED = A(3)/V

Y = IPRED * (1 + EPS(1))

REPL = IREP

; ==================== RUNNING MODE ======================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

Page 143: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.A. NONMEM: A SIMULTANEOUS FIRST-ORDER ABSORPTION MODEL 143

;==================== SIMULATION OUTPUT ===================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_SIMULT1STORDERABSORP_1STORDERELIM_SIMOUT

$TABLE REPL ID TIME V CL KA1 KA2 F1 ONEHEADER NOPRINT NOAPPEND

FIRSTONLY

FILE = ONECPT_SIMULT1STORDERABSORP_1STORDERELIM_POSTHOC

5.A.2 Michaelis-Menten Elimination

$PROBLEM ONE -CPT WITH TWO SIMULTANEOUS FIRST -ORDER ABSORPTION

AND MICHAELIS -MENTEN ELIMINATION

$INPUT ID TIME AMT CMT DV

$DATA ONECPT_TWO1STORDERABSORP_SINGLEBOLUS_SIMIN.csv IGNORE=C

$SUB ADVAN6 TOL = 6

$MODEL

NCOMP = 3

COMP = (ABSORB1)

COMP = (ABSORB2)

COMP = (CENTRAL)

; ============= STRUCTURE MODEL PARAMETERS =================

$PK

;V = VOLUME DISTRIBUTION FOR CENTRAL COMPARTMENT

TVV = THETA (1)

V = TVV * EXP(ETA (1))

; KM = HALF SATURATION CONSTANT

TVKM = THETA (2)

KM = TVKM*EXP(ETA(2))

; VMAX = MAXIMUM ELIMINATION RATE

TVVMAX = THETA (3)

VMAX = TVVMAX*EXP(ETA(3))

;KA1 = ABSORPTION RATE FOR THE 1ST PROCESS

TVKA1 = THETA (4)

Page 144: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

144 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

KA1 = TVKA1 * EXP(ETA(4))

;KA2 = ABSORPTION RATE FOR THE 2ND PROCESS

TVKA2 = THETA (5)

KA2 = TVKA2 * EXP(ETA(5))

; F1 = FRACTION OF DOSE ABSORBED IN THE 1ST PROCESS

TVLOGITF1 = THETA (6)

LOGITF1 = TVLOGITF1

F1 = EXP(LOGITF1)/(1 + EXP(LOGITF1))

; F2 = FRACTION OF DOSE ABSORBED IN THE 2ND PROCESS

F2 = 1-F1

; ============ INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

5 ;TVV

1 ;TVKM

2 ;TVVMAX

0.5 ;TVKA1

1.5 ;TVKA2

0.1 ;TVLOGITF1

; OMEGA MATRIX

$OMEGA

0.01 ; ETA V

0.01 ; ETA KM

0.01 ; ETA VMAX

0.01 ; ETA KA1

0.01 ; ETA KA2

; ================ ODE MODEL ===============================

$DES

DADT (1) = -KA1*A(1) ;1ST ABSORPTION COMPARTMENT

DADT (2) = -KA2*A(2) ;2ND ABSORPTION COMPATMENT

DADT (3) = KA1*A(1) + KA2*A(2) - VMAX*A(3)/(KM*V + A(3)) ;

CENTRAL COMPARTMENT

; =============== RESIDUAL ERROR MODEL ====================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

Page 145: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.B. NONMEM CODES: A PARALLEL FIRST-ORDER ABSORPTION MODEL 145

$SIGMA 0.01

; RESDIUAL ERROR MODEL

$ERROR

IPRED = A(3)/V

Y = IPRED * (1 + EPS(1))

REPL = IREP

; ==================== RUNNING MODE =====================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

;==================== SIMULATION OUTPUT ==================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_SIMULT1STORDERABSORP_MMELIM_SIMOUT

$TABLE REPL ID TIME V KM VMAX KA1 KA2 F1 ONEHEADER NOPRINT

NOAPPEND FIRSTONLY

FILE = ONECPT_SIMULT1STORDERABSORP_MMELIM_POSTHOC

5.B NONMEM Codes: A Parallel First-order Absorp-

tion Model

$PROBLEM TWO PARALLEL FIRST -ORDER ABSORPTION MODEL

$INPUT ID TIME AMT CMT DV

$DATA ONECPT_TWO1STORDERABSORP_SINGLEBOLUS_SIMIN.csv IGNORE=C

$SUB ADVAN6 TOL = 6

$MODEL

NCOMP = 3

COMP = (ABSORB1)

COMP = (ABSORB2)

COMP = (CENTRAL)

; ============= STRUCTURE MODEL PARAMETERS ==================

$PK

;V = VOLUME DISTRIBUTION FOR CENTRAL COMPARTMENT

TVV = THETA (1)

Page 146: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

146 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

V = TVV * EXP(ETA (1))

;CL = CENTRAL CLEARANCE RATE

TVCL = THETA (2)

CL = TVCL * EXP(ETA(2))

;KA1 = ABSORPTION RATE FOR THE 1ST PROCESS

TVKA1 = THETA (3)

KA1 = TVKA1 * EXP(ETA(3))

;KA2 = ABSORPTION RATE FOR THE 2ND PROCESS

TVKA2 = THETA (4)

KA2 = TVKA2 * EXP(ETA(4))

;ALAG2 = LAG TIME FOR THE 2ND PROCESS

TVALAG2 = THETA (5)

ALAG2 = TVALAG2 * EXP(ETA(5))

; F1 = FRACTION OF DOSE ABSORBED IN THE 1ST PROCESS

TVLOGITF1 = THETA (6)

LOGITF1 = TVLOGITF1

F1 = EXP(LOGITF1)/(1 + EXP(LOGITF1))

; F2 = FRACTION OF DOSE ABSORBED IN THE 2ND PROCESS

F2 = 1-F1

; ============ INITIAL VALUES FOR THETA AND OMEGA =============

$THETA

5 ;TVV

1 ;TVCL

0.5 ;TVKA1

1.5 ;TVKA2

1 ;TVALAG2

0.1 ;TVLOGITF1

; OMEGA MATRIX

$OMEGA

0.01 ; ETA V

0.01 ; ETA CL

0.01 ; ETA KA1

0.01 ; ETA KA2

0.01 ; ETA ALAG2

Page 147: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.C. NONMEM: SIMULTANEOUS FIRST- AND ZERO-ORDER ABSORPTION 147

; ================ ODE MODEL ==============================

$DES

DADT (1) = -KA1*A(1) ;1ST ABSORPTION COMPARTMENT

DADT (2) = -KA2*A(2) ;2ND ABSORPTION COMPATMENT

DADT (3) = KA1*A(1) + KA2*A(2) - CL/V*A(3) ;CENTRAL

COMPARTMENT

; =============== RESIDUAL ERROR MODEL =====================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA 0.01

; RESDIUAL ERROR MODEL

$ERROR

IPRED = A(3)/V

Y = IPRED * (1 + EPS(1))

REPL = IREP

; ==================== RUNNING MODE ========================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

;==================== SIMULATION OUTPUT ======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_PARALLEL1STORDERABSORP_1STORDERELIM_SIMOUT

$TABLE REPL ID TIME V CL KA1 KA2 ALAG2 F1 ONEHEADER NOPRINT

NOAPPEND FIRSTONLY

FILE = ONECPT_PARALLEL1STORDERABSORP_1STORDERELIM_POSTHOC

5.C NONMEM Codes: A Simultaneous First-order and

Zero-order Absorption Model

$PROBLEM ONE -CPT MODEL WITH SIMULTANEOUS 1ST -ORDER AND 0-ORDER

ABSORPTION AND 1ST-ORDER ELIMINATION

$INPUT ID TIME AMT CMT RATE DV

$DATA ONECPT_MIXED1STORDER0ORDERABSORP_SINGLEBOLUS_SIMIN.csv

IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

Page 148: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

148 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

$MODEL

NCOMP=2

COMP = (ABSORP)

COMP = (CENTRAL)

; =========== STRUCTURE MODEL PARAMETERS ===============

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

;CL = CENTRAL CLEARANCE RATE

TVCL = THETA (2)

CL = TVCL * EXP(ETA(2))

;KA = ABSORPTION RATE FOR THE 1ST-ORDER ABSORPTION PROCESS

TVKA = THETA (3)

KA = TVKA * EXP(ETA(3))

; DURATION FOR THE ZERO -ORDER ABSORPTION PROCESS

TVD2 = THETA (4)

D2 = TVD2 * EXP(ETA(4))

; F1 = FRACTION OF DOSE ABSORBED IN THE 1ST-ORDER ABSORPTION

PROCESS

TVLOGITF1 = THETA (5)

LOGITF1 = TVLOGITF1

F1 = EXP(LOGITF1)/(1 + EXP(LOGITF1))

; F2 = FRACTION OF DOSE ABSORBED IN THE ZERO -ORDER ABSORPTION

PROCESS

F2 = 1-F1

; ========= INITIAL VALUES FOR THETA AND OMEGA =============

$THETA

5 ;TVV

1 ;TVCL

2.5 ;TVKA

6 ;TVD2

0.1 ;TVLOGITF1

$OMEGA

0.01 ;ETA V

0.01 ; ETA CL

Page 149: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.D. NONMEM: FIRST-ORDER PROCESS FOLLOWED BY ZERO-ORDER PROCESS149

0.01 ; ETA KA

0.01 ; ETA D2

; ============== ODE model ====================================

$DES

DADT (1) = -KA * A(1) ; ABSORPTION COMPARTMENT FOR THE 1ST -

ORDER PROCESS

DADT (2) = KA * A(1) - CL / V * A(2) ;CENTRAL COMPARTMENT

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

IPRED = A(2)/V

Y = IPRED *(1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_SIMULT1STORDER0ORDERABSORP_1STORDERELIM_SIMOUT

$TABLE REPL ID TIME V CL KA D2 F1 ONEHEADER NOPRINT NOAPPEND

FIRSTONLY

FILE =

ONECPT_SIMULT1STORDER0ORDERABSORP_1STORDERELIM_POSTHOC

5.D NONMEM Codes: A Sequential First-order and

Zero-order Absorption Model with the First-order

Process Followed by the Zero-order Process

$PROBLEM ONE -CPT MODEL WITH SEQUENTIAL 1ST-ORDER AND 0-ORDER

ABSORPTION AND 1ST-ORDER ELIMINATION

$INPUT ID TIME AMT CMT RATE DV

$DATA ONECPT_MIXED1STORDER0ORDERABSORP_SINGLEBOLUS_SIMIN.csv

Page 150: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

150 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP=2

COMP = (ABSORP)

COMP = (CENTRAL)

; =============== STRUCTURE MODEL PARAMETERS ================

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

;CL = CENTRAL CLEARANCE RATE

TVCL = THETA (2)

CL = TVCL * EXP(ETA(2))

;KA = ABSORPTION RATE FOR THE 1ST-ORDER ABSORPTION PROCESS

TVKA = THETA (3)

KA = TVKA * EXP(ETA(3))

; DURATION FOR THE ZERO -ORDER ABSORPTION PROCESS

TVD2 = THETA (4)

D2 = TVD2 * EXP(ETA(4))

; F1 = FRACTION OF DOSE ABSORBED IN THE 1ST-ORDER ABSORPTION

PROCESS

TVLOGITF1 = THETA (5)

LOGITF1 = TVLOGITF1

F1 = EXP(LOGITF1)/(1 + EXP(LOGITF1))

; F2 = FRACTION OF DOSE ABSORBED IN THE ZERO -ORDER ABSORPTION

PROCESS

F2 = 1-F1

; ALAG2 = DELAY TIME FOR THE ZERO -ORDER ABSORPTION PROCESS

TVALAG2 = THETA (6)

ALAG2 = TVALAG2 * EXP(ETA(5))

; ============= INITIAL VALUES FOR THETA AND OMEGA ===========

$THETA

5 ;TVV

1 ;TVCL

Page 151: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.D. NONMEM: FIRST-ORDER PROCESS FOLLOWED BY ZERO-ORDER PROCESS151

2.5 ;TVKA

6 ;TVD2

0.1 ;TVLOGITF1

2 ;TVALAG2

$OMEGA

0.01 ;ETA V

0.01 ; ETA CL

0.01 ; ETA KA

0.01 ; ETA D2

0.01 ; ETA ALAG2

; ============== ODE model ====================================

$DES

DADT (1) = -KA * A(1) ; ABSORPTION COMPARTMENT FOR THE 1ST -

ORDER PROCESS

DADT (2) = KA * A(1) - CL / V * A(2) ;CENTRAL COMPARTMENT

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

IPRED = A(2)/V

Y = IPRED *(1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_SEQ1STORDER0ORDERABSORP_1STORDERELIM_SIMOUT

$TABLE REPL ID TIME V CL KA D2 F1 ONEHEADER NOPRINT NOAPPEND

FIRSTONLY

FILE = ONECPT_SEQ1STORDER0ORDERABSORP_1STORDERELIM_POSTHOC

Page 152: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

152 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

5.E NONMEM Codes: A Sequential First-order and

Zero-order Absorption Model with the Zero-order

Process Followed by the First-order Process

$PROBLEM ONE -CPT MODEL WITH SEQUENTIAL 0-ORDER AND 1ST-ORDER

ABSORPTION AND 1ST-ORDER ELIMINATION

$INPUT ID TIME AMT CMT RATE DV

$DATA ONECPT_MIXED1STORDER0ORDERABSORP_SINGLEBOLUS_SIMIN.csv

IGNORE=C

$SUBROUTINES ADVAN6 TOL = 6

$MODEL

NCOMP=2

COMP = (ABSORP)

COMP = (CENTRAL)

; =============== STRUCTURE MODEL PARAMETERS ===============

$PK

; V = VOLUMNE OF DISTRIBUTION

TVV = THETA (1)

V = TVV * EXP(ETA (1))

;CL = CENTRAL CLEARANCE RATE

TVCL = THETA (2)

CL = TVCL * EXP(ETA(2))

;KA = ABSORPTION RATE FOR THE 1ST-ORDER ABSORPTION PROCESS

TVKA = THETA (3)

KA = TVKA * EXP(ETA(3))

; DURATION FOR THE ZERO -ORDER ABSORPTION PROCESS

TVD2 = THETA (4)

D2 = TVD2 * EXP(ETA(4))

; F1 = FRACTION OF DOSE ABSORBED IN THE 1ST-ORDER ABSORPTION

PROCESS

TVLOGITF1 = THETA (5)

LOGITF1 = TVLOGITF1

F1 = EXP(LOGITF1)/(1 + EXP(LOGITF1))

; F2 = FRACTION OF DOSE ABSORBED IN THE ZERO -ORDER ABSORPTION

Page 153: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

5.E. NONMEM: ZERO-ORDER PROCESS FOLLOWED BY FIRST-ORDER PROCESS153

PROCESS

F2 = 1-F1

; ALAG1 = DELAY TIME FOR THE FIRST -ORDER ABSORPTION PROCESS

TVALAG1 = THETA (6)

ALAG1 = TVALAG1 * EXP(ETA(5))

; ========= INITIAL VALUES FOR THETA AND OMEGA =============

$THETA

5 ;TVV

1 ;TVCL

2.5 ;TVKA

6 ;TVD2

0.1 ;TVLOGITF1

2 ;TVALAG1

$OMEGA

0.01 ;ETA V

0.01 ; ETA CL

0.01 ; ETA KA

0.01 ; ETA D2

0.01 ; ETA ALAG1

; ============== ODE model ====================================

$DES

DADT (1) = -KA * A(1) ; ABSORPTION COMPARTMENT FOR THE 1ST -

ORDER PROCESS

DADT (2) = KA * A(1) - CL / V * A(2) ;CENTRAL COMPARTMENT

; =============== RESIDUAL ERROR MODEL ========================

; VARIANCE MATRIX (SIGMA) OF THE RESIDUAL VARIABILITY

$SIGMA

0.01

; RESIDUAL ERROR MODEL

$ERROR

IPRED = A(2)/V

Y = IPRED *(1 + EPS(1))

REPL = IREP

; ================ RUNNING MODE ============================

$SIMULATION (123456789) ONLYSIM SUBPROBLEMS = 100

Page 154: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

154 CHAPTER 5. MODELS WITH DOUBLE ABSORPTION PATHWAYS

; ================ SIMULATION OUTPUT =======================

$TABLE REPL ID TIME AMT IPRED DV NOPRINT NOAPPEND ONEHEADER

FILE = ONECPT_SEQ0ORDER1STORDERABSORP_1STORDERELIM_SIMOUT

$TABLE REPL ID TIME V CL KA D2 F1 ONEHEADER NOPRINT NOAPPEND

FIRSTONLY

FILE = ONECPT_SEQ0ORDER1STORDERABSORP_1STORDERELIM_POSTHOC

Page 155: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

Bibliography

[1] S. Hu, M. Dunlavey, S. Guzy, and N. Teuscher. A distributed delay approach formodeling delayed outcomes in pharmacokinetics and pharmacodynamics studies. JPharmacokinet Pharmacodyn, 45:285–308, 2018.

[2] Reinier M. Van Hest, Teun Van Gelder, Rene Bouw, Timothy Goggin, Robert Gordon,Richard D. Mamelok, and Ron A. Mathot. Time-dependent clearance of mycophenolicacid in renal transplant recipients. Br J Clin Pharmacol., 63:741–752, 2007.

[3] Gudrun Wurthwein, Claudia Lanvers-Kaminsky, Georg Hempel, Silke Gastine, AnjaMoricke, Martin Schrappe, Mats O. Karlsson, and Joachim Boos. Population pharma-cokinetics to model the time-varying clearance of the pegylated asparaginase oncasparin children with acute lymphoblastic leukemia. European Journal of Drug Metabolismand Pharmacokinetics, 42:955–963, 2017.

[4] G. Levy. Pharmacologic target-mediated drug disposition. Clin Pharmacol Ther,56:248–252, 1994.

[5] D. E. Mager. Target-mediated drug disposition and dynamics. Biochemical Pharmacol-ogy, 72:1–10, 2006.

[6] G. An. Small-molecule compounds exhibiting target-mediated drug disposition(TMDD): A minireview. The Journal of Clinical Pharmacology, 57:137–150, 2017.

[7] L.A. Peletier and J. Gabrielsson. Dynamics of target-mediated drug disposition: char-acteristic profiles and parameter identification. Journal of Pharmacokinetics and Phar-macodynamics, 39:429–451, 2012.

[8] X. Yan, D.E. Mager, and W. Krzyzanski. Selection between Michaelis–Menten andtarget- mediated drug disposition pharmacokinetic models. Journal of Pharmacokineticsand Pharmacodynamics, 37:25–47, 2010.

[9] D. E. Mager and W. J. Jusko. General pharmacokinetic model for drugs exhibitingtarget-mediated drug disposition. Journal of Pharmacokinetics and Pharmacodynamics,28:507–532, 2001.

[10] P. Dua, E. Hawkins, and P. H. van der Graaf. A tutorial on target-mediated drugdisposition (TMDD) models. CPT Pharmacometrics Syst. Pharmacol., 4:324–337, 2015.

155

Page 156: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

156 BIBLIOGRAPHY

[11] G. Koch, W.J. Jusko, and J. Schropp. Target mediated drug disposition with drug–druginteraction, Part II: competitive and uncompetitive cases. J Pharmacokinet Pharmaco-dyn, 44:27–42, 2017.

[12] D. E. Mager and W. Krzyzanski. Quasi-equilibrium pharmacokinetic model for drugsexhibiting target-mediated drug disposition. Pharmaceutical Research, 22:1589–1596,2005.

[13] L. Gibiansky, E. Gibiansky, T. Kakkar, and P. Ma. Approximations of the target-mediated drug disposition model and identifiability of model parameters. J Pharma-cokinet Pharmacodyn, 35:573–591, 2008.

[14] L. Jain, S. Woo, E. R. Gardner, W. L. Dahut, E. C. Kohn, S. Kummar, D. R. Mould,G. Giaccone, R. Yarchoan, J. Venitz, and W. D. Figg. Population pharmacokineticanalysis of sorafenib in patients with solid tumours. Br J Clin Pharmacol., 72:294–305,2011.

[15] Karl Brendel, Sylvain Fouliard, and Marylore Chenel. How to deal properly withchange-point model in NONMEM. https://www.page-meeting.org/pdf_assets/

8555-Poster_PAGE_2013_Brendel.pdf, 2013. Page.

[16] H. Zhou. Pharmacokinetic strategies in deciphering atypical drug absorption profiles. JClin Pharmacol, 43:211–227, 2003.

[17] Johan Gabrielsson and Daniel Weiner. Pharmacokinetic and Pharmacodynamic DataAnalysis: Concepts and Applications. Swedish Pharmaceutical Press, Stockholm, Swe-den, 5 edition, 2016.

[18] L. Kagan. Pharmacokinetic modeling of the subcutaneous absorption of therapeuticproteins. Drug Metabolism and Disposition, 42:1890–1905, 2014.

[19] O. Petricoul, V. Cosson, E. Fuseau, and M. Marchand. Population models for drugabsorption and enterohepatic recycling. In E.I. Ette and P.J. Williams, editors, Phar-macometrics: the Science of Quantitative Pharmacology, pages 345–382. John Wiley &Sons, Hoboken, New Jersey, 2007.

[20] N. H. Holford, R. J. Ambros, and K. Stoeckel. Models for describing absorption rate andestimating extent of bioavailability: application to cefetamet pivoxil. J PharmacokinetBiopharm, 20:421–442, 1992.

Page 157: Trial Simulator for NONMEM Modelers Examples Guide...2018/12/03  · Trial Simulator for NONMEM Modelers Examples Guide Applies to: NONMEM 7.3, Trial Simulator 2.3 Version 1 Certara

Index

Dirac delta function, 14

Equilibrium dissociation rate, 50

Heaviside step function, 14

Mixed first-order and zero-order absorptionmodels, 120

Parallel first-order absorption models, 119Proportional error model, 15

Quasi-equilibrium (QE) approximation, 50Quasi-steady-state (QSS) approximation, 52

Sequential first-order and zero-order absorp-tion model, 121

Simultaneous first-order absorption models,120

Simultaneous first-order and zero-order ab-sorption model, 121

Unit impulse function, 14Unit step function, 14

Wagner model, 52

157