• Language: en

Generate BLQ observations and fit different error models

In this example we will demonstrate generating and fitting to BLQ data using the ~rectnorm() distribution with a simple depot + one compartment model as follows:-

../../../../_images/compartment_diagram300.svg

Fig. 45 One compartment model with depot dosing used to generate and fit BLQ PK data.

Note

See the Depot + One compartment PK with BLQ obtained by the PoPy developers for this example, including input script and output data file.

Generating BLQ observations

The PREDICTIONS section to create BLQ data utilises the ~rectnorm() distribution, as follows:-

PREDICTIONS: |
    p[DV_CENTRAL] = s[CENTRAL]/m[V1]
    var = m[ANOISE]**2 + m[PNOISE]**2 * p[DV_CENTRAL]**2
    # c[DV_CENTRAL] ~ norm(p[DV_CENTRAL], var)
    c[DV_CENTRAL] ~ rectnorm(p[DV_CENTRAL], var, LLQ=0.5)

This creates observations with a LLQ of 0.5, see Table 39.

Table 39 Generated observations + true underlying model PK curves for first three individuals

Notice that no observations are output below 0.5, as expected. PoPy outputs observations of 0.5, if the generated observation is in the interval [-inf, 0.5].

Fitting BLQ observations using rectnorm (correct error model)

We fit the same (correct) error model, using the same PREDICTIONS section as follows:-

PREDICTIONS: |
    p[DV_CENTRAL] = s[CENTRAL]/m[V1]
    var = m[ANOISE]**2 + m[PNOISE]**2 * p[DV_CENTRAL]**2
    # c[DV_CENTRAL] ~ norm(p[DV_CENTRAL], var)
    c[DV_CENTRAL] ~ rectnorm(p[DV_CENTRAL], var, LLQ=0.5)

i.e. a ~rectnorm() distribution, with a LLQ of 0.5. Note that, this fitting method does not require the LAPLACE objective function, we can use the FOCE objective function instead in PoPy.

See Table 40 for PK curves after fitting.

Table 40 Fitted model PK curves vs true model PK curves for first three individuals

Note that the fitted curves (solid blue) line are estimated to be below the LLQ level of 0.5 at later time points.

The estimated f[X] compared to the true f[X] are shown in Table 41 and Table 42.

Table 41 Comparison of initial, fitted and true f[X] main values
Name Initial Fitted True Abs. Error Prop. Error
f[KA] 1 0.21 0.2 1.04e-02 5.20%
f[CL] 1 2.06 2 6.01e-02 3.00%
f[V1] 20 47.8 50 2.16e+00 4.32%
Table 42 Comparison of initial, fitted and true f[X] noise values
Name Initial Fitted True Abs. Error Prop. Error
f[PNOISE] 0.1 0.151 0.15 1.28e-03 0.85%

Table 41 and Table 42 show that the f[KA], f[CL], f[V1], f[PNOISE] parameters are recovered well when fitting with ~rectnorm() distribution.

The full set of fitted f[X] variable is shown below:-

f[KA] = 0.2104
f[CL] = 2.0601
f[V1] = 47.8386
f[KA_isv,CL_isv,V1_isv] = [
    [ 0.0597, 0.0033, 0.0142 ],
    [ 0.0033, 0.0319, 0.0093 ],
    [ 0.0142, 0.0093, 0.1106 ],
]
f[PNOISE] = 0.1513
f[ANOISE] = 0.0100

These fitted values can be compared with fitting alternative error models below.

Fitting BLQ observations using norm (incorrect error model)

Note

See the Depot One Comp PK with BLQ observations set to LLQ script and results used by the PoPy developers for this example.

We fit a (incorrect) error model which treats observations of LLQ as actual 0.5 observations, using a ~norm() distribution, as follows:-

PREDICTIONS: |
    p[DV_CENTRAL] = s[CENTRAL]/m[V1]
    var = m[ANOISE]**2 + m[PNOISE]**2 * p[DV_CENTRAL]**2
    c[DV_CENTRAL] ~ norm(p[DV_CENTRAL], var)
    # c[DV_CENTRAL] ~ rectnorm(p[DV_CENTRAL], var, LLQ=0.5)

For fitted curves see Table 43.

Table 43 Fitted model ~norm() distribution error curves vs LLQ model PK curves for first three individuals

Note that the fitted curves (solid blue) line try to stay close to the BLQ values at 0.5, which is incorrect, as the PK curve should approach zero concentration instead.

The fitted f[X] values are:-

f[KA] = 1.6306
f[CL] = 0.9667
f[V1] = 86.8189
f[KA_isv,CL_isv,V1_isv] = [
    [ 0.1541, -0.0011, -0.0022 ],
    [ -0.0011, 0.0000, -0.0004 ],
    [ -0.0022, -0.0004, 0.0428 ],
]
f[PNOISE] = 0.2353
f[ANOISE] = 0.0100

These fitted values are inaccurate compared to the parameters recovered using the ~rectnorm() distribution in section Fitting BLQ observations using rectnorm (correct error model) above.

Fitting BLQ observations using half LLQ (approx error model)

Note

See the Depot One Comp PK with BLQ observations set to 0.5*LLQ script and results used by the PoPy developers for this example.

We fit a simple approx BLQ error model, which models observations of LLQ as bare 0.5* LLQ observations, by preprocessing the original observation data, as follows:-

PREPROCESS: |
    # use halve value blq data
    if c[DV_CENTRAL] <= 0.5 and c[TYPE] == 'obs':
        c[DV_CENTRAL] = 0.25

The ~norm() distribution is used to model these amended observations (similar to Fitting BLQ observations using norm (incorrect error model) above), see:-

PREDICTIONS: |
    p[DV_CENTRAL] = s[CENTRAL]/m[V1]
    var = m[ANOISE]**2 + m[PNOISE]**2 * p[DV_CENTRAL]**2
    c[DV_CENTRAL] ~ norm(p[DV_CENTRAL], var)
    # c[DV_CENTRAL] ~ rectnorm(p[DV_CENTRAL], var, LLQ=0.5)

For fitted curves using this half LLQ approximation, see Table 44.

Table 44 Fitted model ~norm() distribution error curves vs half LLQ model PK curves for first three individuals

Note that the fitted curves (solid blue) line get closer to zero (the true asymptotic concentration) as time increases, but are still heavily distorted by assuming the half LLQ values are true observations.

The fitted f[X] values are:-

f[KA] = 0.8242
f[CL] = 1.6865
f[V1] = 81.8435
f[KA_isv,CL_isv,V1_isv] = [
    [ 0.0000, 0.0002, 0.0005 ],
    [ 0.0002, 0.0084, 0.0196 ],
    [ 0.0005, 0.0196, 0.0456 ],
]
f[PNOISE] = 0.3395
f[ANOISE] = 0.0100

These fitted values are similar to the results obtained in Fitting BLQ observations using norm (incorrect error model) and also inaccurate compared to the parameters recovered using the ~rectnorm() distribution in section Fitting BLQ observations using rectnorm (correct error model) above.

Fit to non-BLQ observations only (reduced data model)

Note

See the Depot One Comp PK ignoring BLQ observations. script and results used by the PoPy developers for this example.

We can also just ignore the BLQ data, by using PREPROCESS to remove the LLQ observations, as follows:-

PREPROCESS: |
    # ignore blq data
    if c[DV_CENTRAL] <= 0.5 and c[TYPE] == 'obs':
        return

The ~norm() distribution is then used to model the above LLQ observations only, see:-

PREDICTIONS: |
    p[DV_CENTRAL] = s[CENTRAL]/m[V1]
    var = m[ANOISE]**2 + m[PNOISE]**2 * p[DV_CENTRAL]**2
    c[DV_CENTRAL] ~ norm(p[DV_CENTRAL], var)
    # c[DV_CENTRAL] ~ rectnorm(p[DV_CENTRAL], var, LLQ=0.5)

The fitted curves are shown in Table 45.

Table 45 Fitted model ~norm() distribution error curves vs ignore BLQ model PK curves for first three individuals

Note that curves are fitted to the above LLQ observations only, i.e. earlier time points, but there is no data for later LLQ time points.

The fitted f[X] values are:-

f[KA] = 0.2516
f[CL] = 1.8540
f[V1] = 53.2258
f[KA_isv,CL_isv,V1_isv] = [
    [ 0.0000, 0.0001, 0.0004 ],
    [ 0.0001, 0.0297, -0.0018 ],
    [ 0.0004, -0.0018, 0.1109 ],
]
f[PNOISE] = 0.1494
f[ANOISE] = 0.0100

These fitted values are much better then the Fitting BLQ observations using norm (incorrect error model) and Fitting BLQ observations using half LLQ (approx error model) approximatons, but not quite as accurate as the ~rectnorm() distribution results in section Fitting BLQ observations using rectnorm (correct error model).

Back to Top