Dose Proportionality - NCA

Hi,

I am trying to run Dose Proportionality in Pumas and have the following error. Can you please help with that.

These are the doses in my NCA dataset.

 Row │ ID     COHORT  TIME     DV       route    DOSE  
     │ Int64  Int64   Float64  Float64  String3  Int64 
─────┼─────────────────────────────────────────────────
   1 │     1       1      0.0      0.0  ev          25
   2 │     7       2      0.0      0.0  ev          50
   3 │    12       3      0.0      0.0  ev          75
   4 │    16       4      0.0      0.0  ev         125
   5 │    20       5      0.0      0.0  ev         250

When I run NCA using run_nca funtion with sigdigits=2, the newly generated dose column (line 16-19) has a dose of 120 instead of the actual dose of 125. Conversely when I use sigdigits=3 it works fine and shows the dose in those line to be 125mg. Not sure why this discrepancy would arise by changing the significant digits which are decimal places?

Row │ id      DOSE   dose   tlag     tmax     cmax     tlast    clast    clast_pred  auclast  kel      half_life  aucinf_obs  aucinf_pred  vz_f_obs  cl_f_obs  vz_f_pred  c ⋯     │ String  Int64  Int64  Float64  Float64  Float64  Float64  Float64  Float64     Float64  Float64  Float64    Float64     Float64      Float64   Float64   Float64    F ⋯─────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────   1 │ 1          25     25      0.0     1.0      67.0     24.0      6.0         5.9    610.0    0.1          6.9       670.0        670.0      0.37     0.038       0.37    ⋯   2 │ 2          25     25      0.0     3.0      79.0     24.0     15.0        15.0   1000.0    0.082        8.5      1200.0       1200.0      0.26     0.021       0.26     
   3 │ 3          25     25      0.0     2.0      75.0     24.0      7.4         7.3    760.0    0.1          6.7       830.0        830.0      0.29     0.03        0.29     
   4 │ 4          25     25      0.0     2.0      83.0     24.0     16.0        16.0    920.0    0.068       10.0      1200.0       1200.0      0.32     0.022       0.32     
   5 │ 5          25     25      0.0     2.0      94.0     24.0     26.0        26.0   1300.0    0.057       12.0      1700.0       1700.0      0.25     0.014       0.25    ⋯   6 │ 6          25     25      0.0     2.0     110.0     24.0     18.0        18.0   1200.0    0.075        9.3      1500.0       1400.0      0.23     0.017       0.23     
   7 │ 7          50     50      0.0     4.0     190.0     24.0     37.0        36.0   2100.0    0.073        9.6      2600.0       2600.0      0.27     0.019       0.27     
   8 │ 8          50     50      0.0     1.0     160.0     24.0     17.0        17.0   1500.0    0.087        7.9      1600.0       1600.0      0.35     0.03        0.35     
   9 │ 9          50     50      0.0     1.0     190.0     24.0     35.0        35.0   2200.0    0.07         9.9      2700.0       2700.0      0.27     0.019       0.27    ⋯  10 │ 10         50     50      0.0     3.0     170.0     24.0     24.0        24.0   1900.0    0.091        7.6      2200.0       2200.0      0.25     0.023       0.25     
  11 │ 11         50     50      0.0     2.0     160.0     24.0     19.0        19.0   1600.0    0.091        7.6      1800.0       1800.0      0.3      0.027       0.3      
  ⋮  │   ⋮       ⋮      ⋮       ⋮        ⋮        ⋮        ⋮        ⋮         ⋮          ⋮        ⋮         ⋮          ⋮            ⋮          ⋮         ⋮          ⋮        ⋱  15 │ 15         75     75      0.0     4.0     290.0     24.0     89.0        88.0   4100.0    0.064       11.0      5500.0       5500.0      0.21     0.014       0.21     
  16 │ 16        125    120      0.0     0.75    390.0     24.0     47.0        46.0   4100.0    0.094        7.4      4600.0       4600.0      0.29     0.027       0.29    ⋯  17 │ 17        125    120      0.0     1.0     520.0     24.0     80.0        79.0   5500.0    0.076        9.2      6600.0       6600.0      0.25     0.019       0.25     
  18 │ 18        125    120      0.0     1.0     520.0     24.0    130.0       130.0   6300.0    0.051       13.0      8800.0       8800.0      0.28     0.014       0.28     
  19 │ 19        125    120      0.0     2.0     540.0     24.0    140.0       140.0   7000.0    0.055       13.0      9500.0       9500.0      0.24     0.013       0.24     
  20 │ 20        250    250      0.0     3.0     680.0     24.0     97.0        97.0   7700.0    0.088        7.9      8900.0       8800.0      0.32     0.028       0.32    ⋯  21 │ 21        250    250      0.0     2.0     820.0     24.0    170.0       170.0   9300.0    0.063       11.0     12000.0      12000.0      0.33     0.021       0.33     
  22 │ 22        250    250      0.0     3.0     910.0     24.0    230.0       240.0  12000.0    0.061       11.0     16000.0      16000.0      0.26     0.016       0.26     
  23 │ 23        250    250      0.0     2.0     750.0     24.0    130.0       130.0   8400.0    0.07         9.9     10000.0      10000.0      0.35     0.024       0.35     
  24 │ 24        250    250      0.0     0.75   1200.0     24.0    210.0       210.0  14000.0    0.068       10.0     17000.0      17000.0      0.22     0.015       0.22    ⋯  25 │ 25        250    250      0.0     3.0     920.0     24.0    150.0       150.0  10000.0    0.073        9.5     12000.0      12000.0      0.28     0.02        0.28     

This error then causes differences in the calculation of dose proportionality.

Dose linearity pairwise ratio test
Variable: cmax
────────────────────────────────────────────────────
            Ratio  Estimate  low CI 90%  high CI 90%
────────────────────────────────────────────────────
50 vs. 25     2.0   2.09008     1.7942       2.43475
75 vs. 25     3.0   3.48504     2.93812      4.13375
125 vs. 25    5.0   5.8609      4.83306      7.10732
250 vs. 25   10.0  10.3449      8.6096      12.4299 
────────────────────────────────────────────────────

vs (wrong interpretation)

Dose linearity pairwise ratio test
Variable: cmax
────────────────────────────────────────────────────
            Ratio  Estimate  low CI 90%  high CI 90%
────────────────────────────────────────────────────
50 vs. 25     2.0   2.07577     1.77179      2.4319
75 vs. 25     3.0   3.45615     2.87823      4.1501
120 vs. 25    4.8   5.84529     4.78665      7.13806
250 vs. 25   10.0  10.3555      8.51974     12.5869
────────────────────────────────────────────────────

This is how rounding to significant digits work

julia> round(125, sigdigits=2)
120.0

This is not specific to Julia. Here is R

> signif(125, 2)
[1] 120

If you just want to round digits after the decimal point then you should use the digits keyword

julia> round(125, digits=2)
125.0