Chapter 32

Optimal Sampling

return to the Course index
previous | next

Optimal Sampling

Numerical Approach

The optimal sample times can also be calculated numerically using a number of pharmacokinetic programs. Boomer has this facility as does ADAPT with the SAMPLE module. Links from https://www.pharmpk.com.

One Compartment - IV Bolus Administration: Boomer

An example .BAT file is shown in Figure 21.4.1.
Boomer Batch File
    4                             wls,bayes,sim,irwls,sim+error,grid Note 1
    1                             Screen, diskfile                   
f2121kelV                                                    
    1                             Parameter type                     
Dose                                                         
   100.0                          Parameter value                    
    0                             Fixed,adjust,depend1,depend2       
    1                             To                                 
    0                             F-dependence ?                     
    0                             happy or not                       
    2                             Parameter type                     
kel                                                         
  0.2000                          Parameter value                    
    1                             Fixed,adjust,depend1,depend2 Note 2
    0.19990
    0.20001
    2
    0.01       
    0                             To                                 
    1                             From                               
    0                             happy or not                       
   18                             Parameter type                     
V                                                           
   15.00                          Parameter value                    
    1                             Fixed,adjust,depend1,depend2 Note 2
    14.999
    15.001
    2
    0.01       
    1                             To                                 
Cp                                                          
    1                             From                               
    0                             happy or not                       
   -1                             Parameter type                     
    2                             Integration method                 
   0.000                          Relative error                     
   0.000                          Absolute error                     
Simulation kel varying                                      
    1                             Data from disk or keyboard         
   0.000                          X value                            
   0.000                          Y value                            
   1.000                          X value                            
   0.000                          Y value                            
   2.000                          X value                            
   0.000                          Y value                            
   3.000                          X value                            
   0.000                          Y value                            
   4.000                          X value                            
   0.000                          Y value                            
   5.000                          X value                            
   0.000                          Y value                            
   6.000                          X value                            
   0.000                          Y value                            
   7.000                          X value                            
   0.000                          Y value                            
   8.000                          X value                            
   0.000                          Y value                            
   9.000                          X value                            
   0.000                          Y value                            
   10.00                          X value                            
   0.000                          Y value                            
  -1.000                          X value                            
    0                             Accept, correct, delete, insert, of
    0                             Continue or save data              
    0                             Error type for line                
    0                             Weight type Note 3                       
    0                             AUC line number                    
   10                             Continue,save,plot,supplemental,sen Note 4
   -1                             wls,bayes,sim,irwls,sim+error,grid 
Figure 21.4.1 Input .BAT file for optimal sampling calculation

Note 1 Select 'Simulation with random error or sensitivity analysis'
Note 2 Set parameters to be adjustable. Enter 'known' parameter values and set close upper and lower limits
Note 3 Select equal weight. Other weighting is possible but interpretation is curious
Note 4 Select option 10 for graphs and sensitivity

The output of this run is shown in Figure 21.4.2.

 ** FINAL OUTPUT FROM Boomer (v3.4.7) **      16 February 2021 --- 11:36:35 am

 Title:  Simulation kel varying
 Input: From f2121kelv.BAT                                                   
 Output:  To f2121kelV.OUT                                                   
 Data for Cp came from keyboard (or ?.BAT)
 Fitting algorithm: Simulation with Error  Note 1    
 Weighting for Cp by Equal weight                                      
 Numerical integration method: 2) Fehlberg RKF45                                  
          with  1 de(s)
 With relative error   0.1000E-03
 With absolute error   0.1000E-03

 This simulation took     0.3800     seconds

  #  Name                   Value       Low        Original  High

  1) kel                   0.20001      0.200      0.20      0.20  Note 2
  2) V                      15.000       15.0       15.       15.    

 Model and Parameter Definition

  #  Name                    Value       Type From To     Dep  Start Stop

  1) Dose                =   100.0        1    0    1       0    0    0
  2) kel                 =  0.2000        2    1    0       0    0    0
  3) V                   =   15.00       18    1    1       0    0    0

 Data for Cp :-

 DATA #   Time       Observed      Calculated    (Weight)  Weighted residual

     1    0.000       0.00000       6.66644       1.00000       0.00000    
     2    1.000       0.00000       5.45798       1.00000       0.00000    
     3    2.000       0.00000       4.46859       1.00000       0.00000    
     4    3.000       0.00000       3.65854       1.00000       0.00000    
     5    4.000       0.00000       2.99534       1.00000       0.00000    
     6    5.000       0.00000       2.45236       1.00000       0.00000    
     7    6.000       0.00000       2.00781       1.00000       0.00000    
     8    7.000       0.00000       1.64384       1.00000       0.00000    
     9    8.000       0.00000       1.34586       1.00000       0.00000    
    10    9.000       0.00000       1.10189       1.00000       0.00000    
    11    10.00       0.00000      0.902141       1.00000       0.00000    
      Plots of observed (*) and calculated values (+)
           versus time for Cp. Superimposed points (X)

    6.666      Linear                      6.666      Semi-log
 |+                                      |+                                    
 |                                       |                                     
 |                                       |                                     
 |                                       |                                     
 |                                       |   +                                 
 |                                       |                                     
 |   +                                   |                                     
 |                                       |       +                             
 |                                       |                                     
 |                                       |                                     
 |       +                               |          +                          
 |                                       |                                     
 |                                       |                                     
 |                                       |              +                      
 |          +                            |                                     
 |                                       |                                     
 |                                       |                  +                  
 |              +                        |                                     
 |                                       |                                     
 |                  +                    |                     +               
 |                                       |                                     
 |                     +                 |                                     
 |                                       |                         +           
 |                         +             |                                     
 |                            +          |                                     
 |                                       |                            +        
 |                                +   +  |                                     
 |                                       |                                     
 |                                       |                                +    
 |                                       |                                     
 |*  *   *  *   *   *  *   *  *   *   *  |                                    +
 |_____________________________________  |*__*___*__*___*___*__*___*__*___*___*
    0.000                                 0.9021    
 0              <-->             10.     0              <-->             10.    

 Sensitivity, Optimal Sampling Analysis Section

 For kel                 
      Max for line (A) Cp is    12.26     at  5.000  Note 3
 Max      12.26    
 |                               AAAAAAAAAAAAAAAAAAA                             
 |                            AAAA                 AAAAA                         
 |                          AAA                         AAA                      
 |                        AA                               AAA                   
 |                       AA                                   AAAA               
 |                     AA                                        AAAA            
 |                    AA                                            AAAA         
 |                   A                                                  AA       
 |                 AA                                                     AAA    
 |                 A                                                         AAA 
 |                A                                                            AA
 |               A                                                               
 |              A                                                                
 |              A                                                                
 |             A                                                                 
 |            A                                                                  
 |           A                                                                   
 |          A                                                                    
 |          A                                                                    
 |                                                                               
 |         A                                                                     
 |        A                                                                      
 |                                                                               
 |       A                                                                       
 |       A                                                                       
 |                                                                               
 |      A                                                                        
 |     A                                                                         
 |                                                                               
 |    A                                                                          
 |                                                                               
 |   A                                                                           
 |                                                                               
 |   A                                                                           
 |  A                                                                            
 |                                                                               
 | A                                                                             
 |                                                                               
 |                                                                               
 |A------------------------------------------------------------------------------
 Min      0.000    
 0                                                                   10.00    

 For V                   
      Max for line (A) Cp is   0.4444     at  0.000  Note 3   
 Max     0.4444    
 |AA                                                                             
 |  A                                                                            
 |   A                                                                           
 |    A                                                                          
 |     A                                                                         
 |      AA                                                                       
 |       A                                                                       
 |        AA                                                                     
 |          A                                                                    
 |           A                                                                   
 |            AA                                                                 
 |              A                                                                
 |               AA                                                              
 |                 A                                                             
 |                  AA                                                           
 |                    AA                                                         
 |                     AA                                                        
 |                       AA                                                      
 |                        AAA                                                    
 |                           AA                                                  
 |                            AAA                                                
 |                               AA                                              
 |                                 AAA                                           
 |                                   AAA                                         
 |                                      AAA                                      
 |                                         AA                                    
 |                                           AAA                                 
 |                                              AAAA                             
 |                                                  AAAA                         
 |                                                      AAAA                     
 |                                                          AAAAA                
 |                                                               AAAA            
 |                                                                   AAAAAAA     
 |                                                                         AAAAAA
 |                                                                               
 |                                                                               
 |                                                                               
 |                                                                               
 |                                                                               
 |-------------------------------------------------------------------------------
 Min      0.000    
 0                                                                   10.00    
Figure 21.4.2 Output .OUT file for optimal sampling calculation run

Note 1 Equal weight selected
Note 2 Parameter values constrained at specified values
Note 3 Best time for kel is 5 hr and 0 hr for V. The resolution of this calculation is 1/100 the maximum time, here 0.1 hr.

This approach and result are essentially the same as for the graphical approach shown earlier.

One Compartment - Oral Administration: Boomer

An example .BAT file is shown in Figure 21.4.3.
Boomer Batch File
    4                             wls,bayes,sim,irwls,sim+error,grid Note 1
    1                             Screen, diskfile                   
f2121kelVka                                                    
    1                             Parameter type                     
Dose                                                         
   100.0                          Parameter value                    
    0                             Fixed,adjust,depend1,depend2       
    1                             To                                 
    0                             F-dependence ?                     
    0                             happy or not                       
    2                             Parameter type                     
ka                                                         
  1.5000                          Parameter value              
    1                             Fixed,adjust,depend1,depend2 Note 2
    1.49999
    1.50001
    2
    0.01       
    2                             To                                 
    1                             From                               
    0                             happy or not                       
    2                             Parameter type                     
kel                                                         
  0.2000                          Parameter value                    
    1                             Fixed,adjust,depend1,depend2 Note 2
    0.19999
    0.20001
    2
    0.01       
    0                             To                                 
    2                             From                               
    0                             happy or not                       
   18                             Parameter type                     
V                                                           
   15.00                          Parameter value                    
    1                             Fixed,adjust,depend1,depend2 Note 2
    14.999
    15.001
    2
    0.01       
    1                             To                                 
Cp                                                          
    2                             From                               
    0                             happy or not                       
   -1                             Parameter type                     
    2                             Integration method                 
   0.000                          Relative error                     
   0.000                          Absolute error                     
Simulation kel varying                                      
    1                             Data from disk or keyboard         
   0.000                          X value                            
   0.000                          Y value                            
   1.000                          X value                            
   0.000                          Y value                            
   2.000                          X value                            
   0.000                          Y value                            
   3.000                          X value                            
   0.000                          Y value                            
   4.000                          X value                            
   0.000                          Y value                            
   5.000                          X value                            
   0.000                          Y value                            
   6.000                          X value                            
   0.000                          Y value                            
   7.000                          X value                            
   0.000                          Y value                            
   8.000                          X value                            
   0.000                          Y value                            
   9.000                          X value                            
   0.000                          Y value                            
   10.00                          X value                            
   0.000                          Y value                            
  -1.000                          X value                            
    0                             Accept, correct, delete, insert, of
    0                             Continue or save data              
    0                             Error type for line                
    0                             Weight type Note 3                      
    0                             AUC line number                    
   10                             Continue,save,plot,supplemental,sen Note 4
   -1                             wls,bayes,sim,irwls,sim+error,grid 
Figure 21.4.3 Input .BAT file for optimal sampling calculation

Note 1 Select 'Simulation with random error or sensitivity analysis'
Note 2 Set parameters to be adjustable. Enter 'known' parameter values and set close upper and lower limits
Note 3 Select equal weight. Other weighting is possible but interpretation is curious
Note 4 Select option 10 for graphs and sensitivity

The output of this run is shown in Figure 21.4.4.

 ** FINAL OUTPUT FROM Boomer (v3.4.7) **      16 February 2021 --- 12:06:23 pm

 Title:  Simulation kel varying
 Input: From f2121kelvka.BAT                                                 
 Output:  To f2121kelVka.OUT                                                 
 Data for Cp came from keyboard (or ?.BAT)
 Fitting algorithm: Simulation with Error      
 Weighting for Cp by Equal weight Note 1                                   
 Numerical integration method: 2) Fehlberg RKF45                                  
          with  2 de(s)
 With relative error   0.1000E-03
 With absolute error   0.1000E-03

 This simulation took     0.1000E-01 seconds

  #  Name                   Value       Low        Original  High

  1) ka                     1.5000       1.50       1.5       1.5 Note 2  
  2) kel                   0.20000      0.200      0.20      0.20    
  3) V                      15.000       15.0       15.       15.    

 Model and Parameter Definition

  #  Name                    Value       Type From To     Dep  Start Stop

  1) Dose                =   100.0        1    0    1       0    0    0
  2) ka                  =   1.500        2    1    2       0    0    0
  3) kel                 =  0.2000        2    2    0       0    0    0
  4) V                   =   15.00       18    2    1       0    0    0

 Data for Cp :-

 DATA #   Time       Observed      Calculated    (Weight)  Weighted residual

     1    0.000       0.00000       0.00000       0.00000       0.00000    
     2    1.000       0.00000       4.58151       1.00000       0.00000    
     3    2.000       0.00000       4.77330       1.00000       0.00000    
     4    3.000       0.00000       4.13613       1.00000       0.00000    
     5    4.000       0.00000       3.43726       1.00000       0.00000    
     6    5.000       0.00000       2.82554       1.00000       0.00000    
     7    6.000       0.00000       2.31588       1.00000       0.00000    
     8    7.000       0.00000       1.89665       1.00000       0.00000    
     9    8.000       0.00000       1.55296       1.00000       0.00000    
    10    9.000       0.00000       1.27148       1.00000       0.00000    
    11    10.00       0.00000       1.04101       1.00000       0.00000    
      Plots of observed (*) and calculated values (+)
           versus time for Cp. Superimposed points (X)

    4.773      Linear                      4.773      Semi-log
 |       +                               |       +                             
 |                                       |   +                                 
 |   +                                   |                                     
 |                                       |          +                          
 |                                       |                                     
 |          +                            |                                     
 |                                       |                                     
 |                                       |              +                      
 |                                       |                                     
 |              +                        |                                     
 |                                       |                                     
 |                                       |                  +                  
 |                                       |                                     
 |                  +                    |                                     
 |                                       |                                     
 |                                       |                     +               
 |                     +                 |                                     
 |                                       |                                     
 |                                       |                                     
 |                         +             |                         +           
 |                                       |                                     
 |                            +          |                                     
 |                                       |                                     
 |                                +      |                            +        
 |                                    +  |                                     
 |                                       |                                     
 |                                       |                                     
 |                                       |                                +    
 |                                       |                                     
 |                                       |                                     
 |X  *   *  *   *   *  *   *  *   *   *  |                                    +
 |_____________________________________  |X__*___*__*___*___*__*___*__*___*___*
    0.000                                  1.041    
 0              <-->             10.     0              <-->             10.    

 Sensitivity, Optimal Sampling Analysis Section

 For ka                  
      Max for line (A) Cp is   -1.498     at 0.6000  Note 3
 Max     0.2804    
 |                           AAAAAAAAAAAAAAAAAAAA                                
 |                         AA                    AAAAAAAAAA                      
 |                       AA                               AAAAAAAAAAA            
 |                      A                                            AAAAAAAAAAAA
 |                     A                                                         
 |                    AA                                                         
 |A------------------A-----------------------------------------------------------
 |                                                                               
 |                  A                                                            
 |                 A                                                             
 |                 A                                                             
 |                                                                               
 |                A                                                              
 |               A                                                               
 |                                                                               
 |              A                                                                
 |                                                                               
 |              A                                                                
 | A                                                                             
 |             A                                                                 
 |                                                                               
 |            A                                                                  
 |                                                                               
 |                                                                               
 |           A                                                                   
 |                                                                               
 |          A                                                                    
 |  A                                                                            
 |          A                                                                    
 |                                                                               
 |                                                                               
 |         A                                                                     
 |                                                                               
 |   A    A                                                                      
 |                                                                               
 |       A                                                                       
 |   A                                                                           
 |       A                                                                       
 |    A A                                                                        
 |     A                                                                         
 Min     -1.498    
 0                                                                   10.00    

 For kel                 
      Max for line (A) Cp is    12.13     at  5.800  Note 3
 Max      12.13    
 |                                      AAAAAAAAAAAAAAAAA                        
 |                                   AAA                 AAAAA                   
 |                                AAA                        AAAAA               
 |                              AA                               AAAA            
 |                            AA                                    AAAA         
 |                           AA                                         AAA      
 |                          A                                              AAA   
 |                        AA                                                  AA 
 |                        A                                                     A
 |                       A                                                       
 |                     AA                                                        
 |                     A                                                         
 |                    A                                                          
 |                   A                                                           
 |                  A                                                            
 |                 A                                                             
 |                 A                                                             
 |                A                                                              
 |               A                                                               
 |              A                                                                
 |                                                                               
 |              A                                                                
 |             A                                                                 
 |            A                                                                  
 |           A                                                                   
 |                                                                               
 |          A                                                                    
 |          A                                                                    
 |         A                                                                     
 |                                                                               
 |        A                                                                      
 |       A                                                                       
 |       A                                                                       
 |      A                                                                        
 |     A                                                                         
 |                                                                               
 |   AA                                                                          
 |   A                                                                           
 | AA                                                                            
 |A------------------------------------------------------------------------------
 Min      0.000    
 0                                                                   10.00    

 For V                   
      Max for line (A) Cp is   0.3259     at  1.600 Note 3
 Max     0.3259    
 |          AAAAAAA                                                              
 |         A       A                                                             
 |        A         AA                                                           
 |       A            AA                                                         
 |                     AA                                                        
 |       A               AA                                                      
 |                        A                                                      
 |      A                  AA                                                    
 |                           AA                                                  
 |     A                      AA                                                 
 |                              A                                                
 |                               A                                               
 |    A                           AA                                             
 |                                  AA                                           
 |                                   AA                                          
 |                                     AA                                        
 |   A                                  AAA                                      
 |                                         AA                                    
 |                                          AAA                                  
 |                                             A                                 
 |   A                                          AAA                              
 |                                                 AA                            
 |                                                   AA                          
 |                                                     AAA                       
 |                                                        AA                     
 |  A                                                       AAA                  
 |                                                             AAA               
 |                                                                AAA            
 |                                                                   AAAA        
 |                                                                       AAAA    
 |                                                                           AAAA
 | A                                                                             
 |                                                                               
 |                                                                               
 |                                                                               
 |                                                                               
 |                                                                               
 |                                                                               
 |                                                                               
 |A------------------------------------------------------------------------------
 Min      0.000    
 0                                                                   10.00    
Figure 21.4.4 Output .OUT file for optimal sampling calculation run


Note 1 Equal weight selected
Note 2 Parameter values constrained at specified values
Note 3 Best time for ka is 0.6 hr, for kel is 5.8 hr and 1.6 hr for V. The resolution of this calculation is 1/100 the maximum time, here 0.1 hr.

This approach and result are essentially the same as for the graphical approach shown earlier.


This page was last modified: Sunday, 28th Jul 2024 at 5:11 pm


Privacy Statement - 25 May 2018

Material on this website should be used for Educational or Self-Study Purposes Only


Copyright © 2001 - 2025 David W. A. Bourne (david@boomer.org)


Pharmacokinetics cover The Book
Pharmacokinetics
This Course in ePub format
Get it on Apple Books