Simulate a PK / PD Model which includes an Effect Compartment

Direct Reversible Response Model

A pharmacodynamic model (PK/PD) model quantitatively combines drug pharmacokinetics (Concentration versus Time, PK) and drug pharmacology (Response versus Concentration, PC) to allow describe of drug pharmacodynamics (Response versus Time, PD).

PK + PC > PD

The basic premise for the clinical utility of pharmacokinetics is that there is a clearly defined relationship between drug concentration in readily available samples and drug response. Application of pharmacokinetic methods allows us to account for the variability in an individual's ability to absorb, distribute, metabolize and excrete drugs. The objective of these methods is to control the drug concentration in blood or plasma and potentially other fluids and tissues. For this approach to be effective there needs to be a relationship between these concentrations and the response to the drug. In some cases the response is direct and reversible and the Hill equation or some variation of it may be be applied.

Direct Reversible Effects

Examples of direct reversible effects might include blood pressure control or muscle relaxation. For many drugs the response is directly related to the drug concentration at the receptor site which in turn is related to the concentration in plasma. As the receptor concentration increases so does the response and with lower concentration the response drops.

Direct reversible response
Figure 1. Direct Reversible Response

In general the receptor might be 'mathematically' within the central compartment, a peripheral compartment or a separate effect compartment. In each case the relationship between concentration at the receptor and the response might be described with a Sigmoid Emax model (Hill equation)

Hill equation
Equation 1. Sigmoid Emax Response versus Concentration, CR (Hill Equation)

Hill equation with baseline
Equation 2. Sigmoid Emax Response versus Concentration, CR (Hill Equation) with Baseline Response

In Equations 1 and 2, Emax is the maximum response, CR, 50% is the concentration which produces a 50% of maximum response (often called EC50%) and γ is a slope factor. For responses which increases from zero, Equation 1 is more appropriate. In other cases where the response is an increase or decrease from a baseline value Equation 2 may be a better choice. Another version of this equation, Equation 1, is the Emax model but this is just the same except that γ is set to 1.

Response versus Concentration
Response versus Concentration (Log scale) where Emax is 80, CR, 50% is 1 and γ is 0.5, 1 or 2.

A PK/PD Model

A pharmacokinetic pharmacodynamic (PK/PD) model includes parameters related to the pharmacokinetics of the drug as well as drug response parameters. In this example the model will be used to simulate drug concentrations and drug response versus time data. The pharmacokinetic model will consist of a two compartment model after intravenous administration and the response will be modeled using the Hill equation with a receptor compartment (Sheiner, 1979). This can be illustrated in the model below.
PKPD Model

A two compartment PK/PD model with an effect compartment

The two compartment model rate constants are represented by k10, k12 and k21. A small amount of drug is transferred from the central to the effect compartment. The rate constant defining this transfer, k1e, has been described by Sheiner et al. "For the transfer of mass to the effect compartment to be negligible, and hence not influence the Cp against time curve, k1e, the rate constant connecting the central compartment to the effect compartment is assumed to be very small relative to the magnitude of the smallest other rate constant of the pharmacokinetic model. Under this assumption, the exact magnitude of k1e, as will be seen below, is inconsequential. In contrast, the rate constant for drug removal from the effect compartment, ke0, will precisely characterize the temporal aspects of equilibration between Cp and effect." This is made even smaller, essentially zero, by including a -k1e rate constant in the model. While preparing these tutorial pages it became evident that the actual value of k1e and CR are highly correlated and not separately identifiable. Of course if actual receptor drug concentration or amounts were known k1e would become identifiable. Alternately or additionally if the CR could be determined by in vitro or other experiment these parameters would become identifiable. Thus, one approach might be to fix the value of k1e at some small number and recognize that the CR value is 'apparent' (such as V, V/F or CL/F when F is unknown). The drug response versus time data can be linked to the drug in the response compartment using the Hill equation parameters Emax, CR, 50% and γ.

The Parameters

For this example we can use these parameter values

Parameter Value Units
Dose 200 mg
k10 0.2 hr-1
k12 1.3 hr-1
k21 1.1 hr-1
V1 12.0 L
k1e 0.01 hr-1
-k1e -0.01 hr-1
keo 0.8 hr-1
Emax 100 percent
CR, 50% 0.25 mg/L
γ 1.5  

Number the Components

Boomer doesn't have a Graphical User interface (GUI) so its a good idea to draw the model and number the components.
PKPD Model

A two compartment PK/PD model with a response compartment

Data sets are numbered as well. One for plasma and two for response.

Entering the Data - A Simulation

Start the run choosing to data enter from a BAT file (fit.BAT), perform a simulation and direct the output to an .OUT file, sim.OUT.
>cd /Directory/For/This/Analysis

>boomer

Boomer v3.4.5
                          Ref: Comput.Meth.Prog.Biomed.,29 (1989) 191-195
 David W.A. Bourne
                              Copyright 1986-2018 D.W.A. Bourne

 See http://www.boomer.org or email david@boomer.org for more info

 Based on the original MULTI by K. Yamaoka, et.al.
  J. Pharmacobio-Dyn., 4,879 (1981); ibid, 6,595 (1983); ibid, 8,246 (1985)

 DATA ENTRY

  0) From KEYBOARD
  1) From .BAT file                -1) From .BAT file (with restart)
  2) From KEYBOARD creating .BAT file
  3) From .BAT file (quiet mode)   -3) From .BAT file (quiet mode-with restart)
  4) to enter data only             5) to calculate AUC from a .DAT file
 -9) to quit                       -8) Registration Information

 Enter choice (0-5, -1, -3, -8 or -9) 1
 Enter .BAT filename 
sim
 The input .BAT filename is sim.BAT                                                         

 METHOD OF ANALYSIS

 0) Normal fitting
 1) Bayesian
 2) Simulation only
 3) Iterative Reweighted Least Squares
 4) Simulation with random error or sensitivity analysis
 5) Grid Search

 -5) To perform Monte Carlo run (Only once at the start of BAT file)
 -4) To perform multi-run (End of BAT file only)
 -3) To run random number test subroutine
 -2) To close (or open) .BAT file
 -1) To finish

 Enter choice (-3 to 5)      2


 Where do you want the output?

 0) Terminal screen
 1) Disk file

 Enter choice (0-2)      1
 Enter .OUT filename 
 The output .OUT filename is sim.OUT
Enter the parameters for the run.
Boomer parameters

Parameters currently available in Boomer for model building

Enter the Dose - here 200 into the central compartment (1)
 Enter type# for parameter  1 (-5 to 51)      1
 Enter parameter name  Dose                                                        
 Enter Dose value     200.0    
 Enter component to receive dose      1
 Enter component for F-dependence ( 1 to - 1 or 0 for no dependence)      0

 Input summary for Dose                 (type  1)

     Fixed value is    200.0    
     Dose/initial amount added to     1

 Enter 0 if happy with input, 1 if not, 2 to start over      0
Enter pharmacokinetic parameters (k10, k12, k21 and V1) for the two compartment model. Note the line name, Cp, for compartment one.
Enter type# for parameter  2 (-5 to 51)       2
 Enter parameter name  k10                                                         
 Enter k10 value    0.2000    
 Enter component to receive flux      0
 Enter component to lose flux      1

 Input summary for k10                  (type  2)

     Fixed value is   0.2000    
     Transfer from     1 to     0

 Enter 0 if happy with input, 1 if not, 2 to start over      0

 Enter type# for parameter  3 (-5 to 51)       2
 Enter parameter name  k12                                                         
 Enter k12 value     1.300    
 Enter component to receive flux      2
 Enter component to lose flux      1

 Input summary for k12                  (type  2)

     Fixed value is    1.300    
     Transfer from     1 to     2

 Enter 0 if happy with input, 1 if not, 2 to start over      0

 Enter type# for parameter  4 (-5 to 51)       2
 Enter parameter name  k21                                                         
 Enter k21 value     1.100    
 Enter component to receive flux      1
 Enter component to lose flux      2

 Input summary for k21                  (type  2)

     Fixed value is    1.100    
     Transfer from     2 to     1

 Enter 0 if happy with input, 1 if not, 2 to start over      0

 Enter type# for parameter  5 (-5 to 51)      18
 Enter parameter name  V1                                                          
 Enter V1 value     12.00    
 Enter data set (line) number      1
 Enter line description  Cp                                                          
 Enter component number (0 for obs x)      1

 Input summary for V1                   (type 18)

     Fixed value is    12.00    
     Component     1 added to line     1

 Enter 0 if happy with input, 1 if not, 2 to start over      0
Next we enter the parameters for the effect compartment. Note that k1e is described as k1e/V1 so that the drug in the effect compartment is in concentration units relative to the concentration in compartment 1, the plasma compartment. Also inclusion of the -k1e term means that the effect compartment amount/concentration doesn't influence the pharmacokinetic results.
 Enter type# for parameter  6 (-5 to 51)       2
 Enter parameter name  k1e                                                      
 Enter k1e/V1 value    0.0100    
 Enter component to receive flux      3
 Enter component to lose flux      1

 Input summary for k1e               (type  2)

     Fixed value is   0.0100    
     Transfer from     1 to     3

 Enter 0 if happy with input, 1 if not, 2 to start over      0

 Enter type# for parameter  7 (-5 to 51)       2
 Enter parameter name  -k1e                                                     
 Enter -k1e/V1 value   -0.0100    
 Enter component to receive flux      0
 Enter component to lose flux      1

 Input summary for -k1e              (type  2)

     Fixed value is  -0.0100    
     Transfer from     1 to     0

 Enter 0 if happy with input, 1 if not, 2 to start over      0

 Enter type# for parameter  8 (-5 to 51)       2
 Enter parameter name  ke0                                                         
 Enter ke0 value    0.8000    
 Enter component to receive flux      0
 Enter component to lose flux      3

 Input summary for ke0                  (type  2)

     Fixed value is   0.8000    
     Transfer from     3 to     0

 Enter 0 if happy with input, 1 if not, 2 to start over      0
Finally we can enter the Hill equation parameters, eMax, EC50% and gamma (here S or i for slope term). The last two parameters, Receptor and Tissue are included here so we can 'sample' the concentration or amount in the receptor and tissue components of the model.
 Enter type# for parameter  9 (-5 to 51)      11
 Enter parameter name  Effect                                                      
 Enter Emax or a Effect value     100.0    
 Enter data set (line) number      2
 Enter line description  Effect                                                      
 Enter component number (0 for obs x)      3

 Input summary for Emax or a Effect     (type 11)

     Fixed value is    100.0    
     Component     3 added to line     2

 Enter 0 if happy with input, 1 if not, 2 to start over      0
 Enter Ec(50%) or b Effect value     0.2500    

 Input summary for Ec(50%) or b Effect  (type 12)

     Fixed value is    0.2500    

 Enter 0 if happy with input, 1 if not, 2 to start over      0
 Enter S or i Effect value     1.500    

 Input summary for S or i Effect        (type 13)

     Fixed value is    1.500    

 Enter 0 if happy with input, 1 if not, 2 to start over      0
 
 Enter type# for parameter 12 (-5 to 51)      18
 Enter parameter name  Receptor                                                    
 Enter Receptor value     1.000    
 Enter data set (line) number      3
 Enter line description  Receptor                                                    
 Enter component number (0 for obs x)      3

 Input summary for Receptor             (type 18)

     Fixed value is    1.000    
     Component     3 added to line     3

 Enter 0 if happy with input, 1 if not, 2 to start over      0

 Enter type# for parameter 13 (-5 to 51)      18
 Enter parameter name  Tissue                                                      
 Enter Tissue value     1.000    
 Enter data set (line) number      4
 Enter line description  Tissue                                                      
 Enter component number (0 for obs x)      2

 Input summary for Tissue               (type 18)

     Fixed value is    1.000    
     Component     2 added to line     4

 Enter 0 if happy with input, 1 if not, 2 to start over      0
Next the numerical integration method is chosen and a description entered before entering the data. Compartmental pharmacokinetic models are typically not stiff systems so the Fehlberg RKF45 method is usually a good choice.

 Method of Numerical Integration

 0) Classical 4th order Runge-Kutta
 1) Runge-Kutta-Gill
 2) Fehlberg RKF45
 3) Adams Predictor-Corrector with DIFSUB
 4) Gears method for stiff equations with PEDERV
 5) Gears method without PEDERV

 Enter choice (0-5)      2

 Enter Relative error term for
     Numerical integration (0.0001)     0.000    

 Enter Absolute error term for
     Numerical integration (0.0001)     0.000    
 Enter description for this analysis:  Simulation of Effect  (Two compartment Model)               

 Enter data from

 0) Disk file
 1) Keyboard

 Enter Choice (0-1)      1

 Enter data for Cp             
      Enter x-value (time) = -1 to finish data entry

 X-value (time)     0.000    
 Y-value (concentration)     0.000    
After entering values for each data set exit by entering -1 for the last X-value. For these simulations Y-values can be entered as 0. Check for errors, save or not and move to the next data set. After all the data sets are entered you can choose to calculate a AUC values or other options such as graphs.
 X-value (time)     24.00    
 Y-value (concentration)     0.000    

 X-value (time)    -1.000    

 Data for Cp

 DATA #      Time      Concentration

      1     0.000        0.000    
      2    0.1000E-01    0.000    
      3    0.2000E-01    0.000    
      4    0.5000E-01    0.000    
      5    0.1000        0.000    
      6    0.1500        0.000    
      7    0.2000        0.000    
      8    0.2500        0.000    
      9    0.5000        0.000    
     10    0.7500        0.000    
     11     1.000        0.000    
     12     2.000        0.000    
     13     3.000        0.000    
     14     4.000        0.000    
     15     6.000        0.000    
     16     9.000        0.000    
     17     12.00        0.000    
     18     15.00        0.000    
     19     18.00        0.000    
     20     21.00        0.000    
     21     24.00        0.000    
 Do you want to

 0) Accept data
 1) Correct data point
 2) Delete data point
 3) Insert new data point
 4) Add offset to x-value

 Enter choice (0-3)      0

 Save Observed Data to Disk Module       

 0) Continue without saving
 1) Save data for                 on disk

 Enter choice      0

 Calculation of AUC and AUMC section

  0) Exit this section
  1) Cp             
  2) Effect         
  3) Receptor       
  4) Tissue         

 Enter line # for required AUC (0- 4)      0

 Additional Output

 Enter ->    0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
 Save Data      x     x     x     x     x     x     x     x
 Graphs            x  x        x  x        x  x        x  x
 Extra files             x  x  x  x              x  x  x  x
 Sensitivity                         x  x  x  x  x  x  x  x

 Save calculated data files, Produce linear, semi-log and
 weighted residual plots, save extra data files or perform
 sensitivity or optimal sampling analysis

 Enter choice (0-15)      2
Among other output information Boomer provides a summary of the model as entered. Here we can check for errors. The BAT file can be edited and re-run as needed.
 Model and Parameter Definition

  #  Name                    Value       Type From To     Dep  Start Stop

  1) Dose                =   200.0        1    0    1       0    0    0
  2) k10                 =  0.2000        2    1    0       0    0    0
  3) k12                 =   1.300        2    1    2       0    0    0
  4) k21                 =   1.100        2    2    1       0    0    0
  5) V1                  =   12.00       18    1    1       0    0    0
  6) k1e                 =  0.1000E-01    2    1    3       0    0    0
  7) -k1e                = -0.1000E-01    2    1    0       0    0    0
  8) ke0                 =  0.8000        2    3    0       0    0    0
  9) Emax or a Effect    =   100.0       11    3    2       0    0    0
 10) Ec(50%) or b Effect =  0.2500       12    0    0       0    0    0
 11) S or i Effect       =   1.500       13    0    0       0    0    0
 12) Receptor            =   1.000       18    3    3       0    0    0
 13) Tissue              =   1.000       18    2    4       0    0    0

 Data for Cp :-

 DATA #   Time       Observed      Calculated    (Weight)  Weighted residual

     1    0.000       0.00000       16.6667       0.00000      -0.00000    
     2   0.1000E-01   0.00000       16.4197       0.00000      -0.00000    
     3   0.2000E-01   0.00000       16.1787       0.00000      -0.00000    
     4   0.5000E-01   0.00000       15.4902       0.00000      -0.00000    
     5   0.1000       0.00000       14.4492       0.00000      -0.00000    
     6   0.1500       0.00000       13.5276       0.00000      -0.00000    
     7   0.2000       0.00000       12.7114       0.00000      -0.00000    
     8   0.2500       0.00000       11.9882       0.00000      -0.00000    
     9   0.5000       0.00000       9.42473       0.00000      -0.00000    
    10   0.7500       0.00000       7.99131       0.00000      -0.00000    
    11    1.000       0.00000       7.16223       0.00000      -0.00000    
    12    2.000       0.00000       5.90452       0.00000      -0.00000    
    13    3.000       0.00000       5.35621       0.00000      -0.00000    
    14    4.000       0.00000       4.90285       0.00000      -0.00000    
    15    6.000       0.00000       4.11486       0.00000      -0.00000    
    16    9.000       0.00000       3.16424       0.00000      -0.00000    
    17    12.00       0.00000       2.43323       0.00000      -0.00000    
    18    15.00       0.00000       1.87109       0.00000      -0.00000    
    19    18.00       0.00000       1.43882       0.00000      -0.00000    
    20    21.00       0.00000       1.10641       0.00000      -0.00000    
    21    24.00       0.00000      0.850795       0.00000      -0.00000    
    22    30.00       0.00000      0.503112       0.00000      -0.00000    
    23    36.00       0.00000      0.297486       0.00000      -0.00000    

Linear and semi-log printer-style plots can be output for a quick review of the results. Note that you can select (above) to save the calculated data for plotting with more advanced graphing software. Below some of these data were plotted using a spreadsheet program.
    Plots of observed (*) and calculated values (+)
           versus time for Cp. Superimposed points (X)

    16.67      Linear                      16.67      Semi-log
 |+                                      |+                                    
 |+                                      |+                                    
 |                                       |+                                    
 |+                                      |+                                    
 |+                                      |                                     
 |                                       |+                                    
 |+                                      |+                                    
 |                                       | +                                   
 |+                                      |  +                                  
 |+                                      |   +                                 
 |                                       |    +                                
 |                                       |      +                              
 |                                       |                                     
 |                                       |         +                           
 |+                                      |                                     
 |                                       |            +                        
 |+                                      |                                     
 |                                       |               +                     
 | +                                     |                                     
 |                                       |                  +                  
 |  +                                    |                                     
 |   +                                   |                     +               
 |    +                                  |                                     
 |      +                                |                        +            
 |                                       |                                     
 |         +                             |                                     
 |            +                          |                                     
 |               +                       |                              +      
 |                  +                    |                                     
 |                     +  +              |                                     
 |***** *  *  *  *  *  *  *     X     X  |                                    +
 |_____________________________________  |*****_*__*__*__*__*__*__*_____*_____*
    0.000                                 0.2975    
 0              <-->             36.     0              <-->             36.    
    Plots of observed (*) and calculated values (+)
           versus time for Effect. Superimposed points (X)

    86.85      Linear                      86.85      Semi-log
 |  +                                    |  +                                  
 | + ++                                  |++ ++ +                              
 |+     +                                |         +                           
 |+                                      |+           +                        
 |         +                             |+              +                     
 |                                       |+                 +                  
 |                                       |                                     
 |            +                          |+                    +               
 |+                                      |                                     
 |                                       |                        +            
 |+              +                       |                                     
 |                                       |                                     
 |                                       |                                     
 |+                                      |+                                    
 |                  +                    |                              +      
 |                                       |                                     
 |                                       |                                     
 |+                    +                 |                                     
 |                                       |                                     
 |                                       |                                     
 |                        +              |                                    +
 |                                       |                                     
 |                                       |+                                    
 |                                       |                                     
 |+                                      |                                     
 |                              +        |                                     
 |                                       |                                     
 |                                       |                                     
 |+                                   +  |                                     
 |                                       |                                     
 |X**** *  *  *  *  *  *  *     *     *  |+                                    
 |_____________________________________  |X****_*__*__*__*__*__*__*_____*_____*
    0.000                                  2.176    
 0              <-->             36.     0              <-->             36.    
It might interesting to view some of the plots that could be prepared from this output. Plasma concentration falling rapidly at first during the rapid phase.
Concentration versus Time
Response versus amount in the tissue compartment(2). Oops, no receptor here, note the slight hysteresis.
Response versus Compartment 2
The response versus 'concentration' in the effect compartment(3) shows no hysteresis.
Response versus Effect Compartment

The BAT and OUT files can be dowloaded.

The BAT file can be saved as sim.BAT and run with Boomer. With the current version of Boomer for Windows the line
Enter component for F-dependence ( 1 to - 1 or 0 for no dependence)      0
will need to be removed.

References