nca.steady_state¶
Steady state parameters of the last dosing interval and superposition.
At steady state under repeated dosing every dosing interval tau looks the
same; the exposure over one interval, AUC(0-tau), equals the single dose
AUC(0-inf) when the kinetics are linear (Gabrielsson & Weiner 2016, ch.
2.8; Rowland & Tozer 2011, ch. 11). The parameters of one interval are
AUC(0-tau)with the values at the dose and attauinterpolated, so that samples before the dose do not add area,Ctrough = C(tau),Cmin,ssandCmax,ssthe smallest and the largest value in the interval,Cavg = AUC(0-tau) / tau,fluctuation = (Cmax,ss - Cmin,ss) / Cavg,swing = (Cmax,ss - Cmin,ss) / Cmin,ss, and the trough variantsfluctuation_tau,swing_tauand the peak-trough ratioptr, which readCtrough = C(tau)where the first two read the smallest observed value,thalf_eff, the effective half-life of the decline (compute_parameters),CLss = Dose / AUC(0-tau)(cl_ss,cl_ss_ffor an extravascular route), the clearance of a multiple dose analysis: the single doseCL,Vz,Vss,auc_inf_dnandcmax_dnareNaNthere (SINGLE_DOSE_PARAMETERS),- the accumulation ratio
R = 1 / (1 - exp(-lambda_z tau))predicted from the terminal phase, and the observed ratios of the last over the first dosing interval of the protocol:accumulation_ratio_obsof the exposure andaccumulation_ratio_cmax_obs,accumulation_ratio_cmin_obsandaccumulation_ratio_ctrough_obsof the peak, the minimum and the trough.
compute_steady_state analyses the last dosing interval of the protocol of
every row, [t_K, t_K + tau], where tau is NCAOptions.tau or the distance
of the last two doses; the parameters of every interval come from
pkpdutils.nca.intervals. A last interval whose last sample falls short of
its end by at most NCAOptions.tau_tolerance of tau is completed with the
terminal regression rather than given up (complete_last_interval). The point
parameters of the same rows are computed
from the last dose on: the values before it are dropped and the times are
relative to it, so that cmax, tmax, the terminal phase and the
extrapolated areas describe the last dosing interval and its decline; the
parameters which would read that slice as a single dose curve are dropped, see
compute_steady_state.
superposition predicts the multiple dose curve of a dosing protocol from a
single dose curve by adding the shifted, dose-scaled single dose curves
(linear superposition), which is valid for linear kinetics.
complete_last_interval
¶
Complete a last dosing interval which falls a little short of its end.
A last sample a few minutes before the nominal end of the interval makes
every steady state parameter of the profile NaN, although the missing
piece of the exposure is a fraction of a percent. Phoenix WinNonlin
describes the case verbatim ("if dose time=0 and tau=24, the last sample
might be at 23.975 or 24.083 hours ... the program will estimate the
AUC_TAU based on the estimated concentration at 24 hours") and EMA asks for
the last sample within ten minutes of the nominal end precisely because it
is common.
An interval whose last measurable sample lies at most
NCAOptions.tau_tolerance * tau before its end is therefore analysed up to
that sample and completed with the terminal regression: the tail from
\(t_\mathrm{last}\) to the end of the interval of
\(C(t) = C_\mathrm{last} e^{-\lambda_z (t - t_\mathrm{last})}\) is
the trough of the interval is the same regression at its end,
\(C_\mathrm{trough} = C_\mathrm{last} e^{-\lambda_z (t_\mathrm{end} -
t_\mathrm{last})}\), and the minimum of the interval is the smaller of the
observed minimum and that trough. The tail is extrapolated from the
observed \(C_\mathrm{last}\), which is what
\(\mathrm{AUC}_{0\text{-}\infty,\mathrm{obs}}\) extrapolates from as well.
The completed columns replace the NaN columns of the last interval, so
every parameter which reads them follows, and the share of the exposure
which was extrapolated is reported as auc_tau_extrap_fraction
(Phoenix AUC_TAU_%Extrap). Beyond the tolerance nothing is completed and
the profile keeps its NCAFlag.INCOMPLETE_INTERVAL.
Only a concentration analysis is completed: an effect timecourse has no terminal regression to extrapolate with.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
ndarray
|
times |
required |
c
|
ndarray
|
values |
required |
intervals
|
dict[str, ndarray]
|
the per-interval variables |
required |
values
|
dict[str, ndarray]
|
the point parameters of the rows, which carry |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
last |
ndarray
|
column index of the last interval of every row |
t_start |
ndarray
|
start of the last interval per row |
t_end |
ndarray
|
end of the last interval per row |
route |
Route | None
|
route of the batch |
options |
NCAOptions
|
the options, |
Returns:
| Type | Description |
|---|---|
ndarray
|
The mask of the completed rows |
ndarray
|
their exposure |
compute_steady_state
¶
compute_steady_state(
t,
c,
*,
dose_amount,
dose_time,
dose_duration,
route,
options,
lloq=None,
windows=None,
)
Point, per-interval and steady state parameters of every row of a batch.
The dose arrays carry the dosing protocol of every row, (N, K) padded
with NaN (pkpdutils.timecourse.Timecourses). The point parameters are
computed from the last dose of every protocol on (the values before it are
dropped), the per-interval parameters over every dosing interval
(pkpdutils.nca.intervals.compute_intervals) and the steady state
parameters from the last interval [t_K, t_K + tau]. A row whose last
interval is not covered by the data carries
NCAFlag.INCOMPLETE_INTERVAL and NaN steady state parameters.
A multiple dose analysis reports no single dose quantities: the slice after
the last dose carries the exposure of every earlier dose as well, so the
parameters which divide the dose by it (SINGLE_DOSE_PARAMETERS: cl,
cl_f, vz, vz_f, vss, auc_inf_dn, cmax_dn) are NaN. The
clearance is cl_ss (cl_ss_f for an extravascular route), the dose over
the exposure of the dosing interval. auc_inf_obs, auc_inf_pred,
aumc_inf and mrt are reported and are the areas of that slice
extrapolated with its terminal phase, i.e. the exposure after the last
dose, not the single dose exposure of the substance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
ndarray
|
times |
required |
c
|
ndarray
|
values |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
dose_amount |
ndarray | None
|
dose amounts |
dose_time |
ndarray | None
|
dose times |
dose_duration |
ndarray | None
|
infusion durations |
route |
Route | None
|
route of the batch |
options |
NCAOptions
|
the options; |
lloq |
ndarray | None
|
limit of quantification per row |
windows |
ndarray | None
|
the terminal window of single rows |
Returns:
| Type | Description |
|---|---|
dict[str, ndarray]
|
The parameters of |
dict[str, ndarray]
|
steady state parameters, the per-interval parameters (with |
dict[str, ndarray]
|
|
accumulation_ratio
¶
Accumulation and stationarity of a steady state study against a single dose study.
Both results come from analyses over the same dosing interval, so both
carry auc_tau. The accumulation ratio is the exposure of the interval at
steady state over the exposure of the same interval after the first dose,
and the stationarity ratio compares the exposure of the interval at steady state with the total exposure of the single dose,
which is 1 for time-invariant linear kinetics and says that the clearance
did not change over the study (CDISC ARAUC and SRAUC; Gabrielsson &
Weiner 2016, ch. 2.8). Within one multiple dose curve the ratio of the last
and the first dosing interval is reported as accumulation_ratio_obs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
steady_state
|
NCAResult
|
result of the analysis of the steady state curve |
required |
single_dose
|
NCAResult
|
result of the analysis of the single dose curve |
required |
Returns:
| Type | Description |
|---|---|
Dataset
|
A dataset over the sample dimensions of the results with the variables |
Dataset
|
|
Dataset
|
|
Dataset
|
analysis reports no |
Raises:
| Type | Description |
|---|---|
ValueError
|
if either result has no |
superposition
¶
Predict the multiple dose curve of a protocol from a single dose curve.
Every dose of the protocol contributes the single dose curve shifted to its
time and scaled by amount_k / amount_single, the linear superposition
which holds for linear kinetics (Gabrielsson & Weiner 2016, ch. 2.8). The
curve is interpolated on the union of the shifted time grids, or on grid,
and continued beyond its last observed point with its terminal phase.
Before the first observed point after a dose the curve runs in a straight
line from the value at the dose, the back-extrapolated \(C_0\) of a bolus
(c0 of the analysis) and 0 for every other route, to that point. The
predicted curve carries a sample right before every dose after the
first, a thousandth of the shortest dosing interval ahead of the dose
time: the sample at the dose time carries the post-dose value, so without
the pre-dose sample the curve of a bolus would rise to the next peak in a
straight line from the last sample of the interval instead of falling to
the trough and jumping. The trough of every interval is therefore in the
curve, and a figure of the prediction shows the sawtooth of a bolus.
The reference amount is the dose of the single dose curve; a curve whose dose amount is 0 carries no scale, so every dose of the protocol then contributes the curve unscaled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timecourse
|
Timecourse
|
the single dose curve (its dose is the reference amount) |
required |
dosing
|
Dosing | DosingRegimen
|
the protocol to superpose, or a |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
options |
NCAOptions | None
|
NCA options for the interpolation and the terminal phase |
t_end |
float | None
|
end of the predicted curve, the last dose time plus the last observed time by default |
grid |
ArrayLike | None
|
the times to predict at, from the first dose to |
Returns:
| Type | Description |
|---|---|
Timecourse
|
The predicted curve carrying the protocol, without a label: the label |
Timecourse
|
of the single dose curve describes that curve, not the prediction. |
Raises:
| Type | Description |
|---|---|
ValueError
|
without |