Time to steady state (TSS) is the dosing occasion (or clock time) at which pre-dose trough concentrations are no longer meaningfully rising. PKNCA provides two NCA-based methods for estimating TSS from trough concentration data collected across multiple dose occasions. Once at steady state, compute interval parameters with Multiple-Dose and Steady-State; to predict the steady-state profile from single-dose data, see Superposition.
Both methods work on trough concentrations (Ctrough = pre-dose concentration; the end of one dosing interval is the pre-dose sample of the next) collected at successive dose numbers, not full PK profiles. See also the package vignette Noncompartmental evaluation of time to steady-state.
11.2 Simulated dataset
We simulate trough concentrations for 8 subjects across 10 dose occasions. Each subject’s troughs rise monoexponentially toward an individual steady-state plateau, \(C_{trough}(n) = C_{ss} (1 - e^{-k n})\). The accumulation rate per dose, \(k\), is 0.3 for a typical subject, with 30% between-subject variability, so a typical subject reaches 90% of steady state after about \(\ln(10)/0.3 \approx 7.7\) doses. \(C_{ss}\) has 20% between-subject variability, and each trough has 5% proportional residual error.
set.seed(6)n_subjects <-8n_doses <-10d_tss <-data.frame(Subject =rep(1:n_subjects, each = n_doses),dose_number =rep(1:n_doses, n_subjects),k =rep(0.3*exp(rnorm(n_subjects, 0, 0.3)), each = n_doses),Css =rep(10*exp(rnorm(n_subjects, 0, 0.2)), each = n_doses))d_tss$ctrough <- d_tss$Css * (1-exp(-d_tss$k * d_tss$dose_number)) *exp(rnorm(nrow(d_tss), 0, 0.05))ggplot(d_tss, aes(x = dose_number, y = ctrough, group = Subject, colour =factor(Subject))) +geom_line() +geom_point() +labs(title ="Simulated trough concentrations across dose occasions",x ="Dose number", y ="Ctrough (mg/L)", colour ="Subject") +theme_minimal()
Reports TSS as the dose occasion at which the predicted concentration reaches a specified fraction of Css (default: 90% = tss.fraction = 0.9).
Returns population, population-individual (popind), individual, and pooled single-model estimates (single fits one model to all data, ignoring subject differences).
11.4 Method 2: Stepwise linear (pk.tss.stepwise.linear)
A non-parametric approach: iteratively tests whether concentrations are still increasing linearly from dose occasion \(k\) onward. TSS is the earliest dose occasion at which the upward trend is no longer statistically significant.
This method is more robust when the rise to steady state is irregular or non-monoexponential.
The result is a data frame with a tss.stepwise.linear column containing the first dose occasion number where concentrations are deemed flat (or NA if steady state cannot be determined from the data).
11.5 Running both methods (pk.tss)
pk.tss() runs both methods and returns results side by side:
Trough concentrations (one per dose occasion per subject)
time
—
both
Dose occasion numbers or actual clock times
subject
—
both
Subject identifiers
time.dosing
—
both
Every dosing time; concentrations at these times are treated as the trough observations the models fit
type
c("monoexponential", "stepwise.linear")
pk.tss wrapper
Which method(s) to run — both by default
tss.fraction
0.9
monoexponential
Fraction of Css that defines “at steady state”
output
c("population","popind","individual","single")
monoexponential
Which output types to return
min.points
3
stepwise linear
Fewest dose occasions a linear model is fit to
level
0.95
stepwise linear
Confidence level for the test of a nonzero slope
verbose
FALSE
both
Print model fitting details
11.7 When the models do not fit
Both methods fit models, and the fits can fail when the troughs do not support them. That happens, for example, when the troughs are already flat from the first dose, are very noisy, or come from too few subjects or occasions. The warnings say which estimate is affected:
nlme warnings such as “nlminb() did not converge” or “Singular precision matrix” come from the population models that pk.tss.monoexponential() tries: random effects on Ctrough,ss and TSS, on TSS only, or on Ctrough,ss only. The best converged model by AIC is used.
pknca_warning_tss_popind_no_random_effect: the best population model has no random effect on TSS, so tss.monoexponential.popind is NA.
pknca_warning_tss_population_no_convergence: no population model converged, so tss.monoexponential.population and tss.monoexponential.popind are NA.
pknca_warning_tss_stepwise_fit_failed (≥ 0.13.0): steady state was not found and some stepwise linear fits failed. The warning names the start times that were skipped; before 0.13.0 the NA was silent.
The simulated data above rise over several doses, so every model fits without a warning. Treat any of these warnings as a sign to plot the troughs and check that the design can show the approach to steady state.
Note: TSS estimation requires multiple dose occasions with consistent trough sampling. It is not applicable to single-dose studies or studies where trough collection was inconsistent.
---title: "Time to Steady State"---```{r setup, include=FALSE}library(PKNCA)library(dplyr)library(ggplot2)conflicted::conflicts_prefer(dplyr::filter, dplyr::select, .quiet =TRUE)```## What is time to steady state?**Time to steady state (TSS)** is the dosing occasion (or clock time) at which pre-dose trough concentrations are no longer meaningfully rising. PKNCA provides two NCA-based methods for estimating TSS from trough concentration data collected across multiple dose occasions. Once at steady state, compute interval parameters with [Multiple-Dose and Steady-State](multiple-dose.qmd); to predict the steady-state profile from single-dose data, see [Superposition](superposition.qmd).Both methods work on trough concentrations (Ctrough = pre-dose concentration; the end of one dosing interval is the pre-dose sample of the next) collected at successive dose numbers, not full PK profiles. See also the package vignette [Noncompartmental evaluation of time to steady-state](https://humanpred.github.io/pknca/articles/v22-time-to-steady-state.html).---## Simulated datasetWe simulate trough concentrations for 8 subjects across 10 dose occasions. Each subject's troughs rise monoexponentially toward an individual steady-state plateau, $C_{trough}(n) = C_{ss} (1 - e^{-k n})$. The accumulation rate per dose, $k$, is 0.3 for a typical subject, with 30% between-subject variability, so a typical subject reaches 90% of steady state after about $\ln(10)/0.3 \approx 7.7$ doses. $C_{ss}$ has 20% between-subject variability, and each trough has 5% proportional residual error.```{r}set.seed(6)n_subjects <-8n_doses <-10d_tss <-data.frame(Subject =rep(1:n_subjects, each = n_doses),dose_number =rep(1:n_doses, n_subjects),k =rep(0.3*exp(rnorm(n_subjects, 0, 0.3)), each = n_doses),Css =rep(10*exp(rnorm(n_subjects, 0, 0.2)), each = n_doses))d_tss$ctrough <- d_tss$Css * (1-exp(-d_tss$k * d_tss$dose_number)) *exp(rnorm(nrow(d_tss), 0, 0.05))ggplot(d_tss, aes(x = dose_number, y = ctrough, group = Subject, colour =factor(Subject))) +geom_line() +geom_point() +labs(title ="Simulated trough concentrations across dose occasions",x ="Dose number", y ="Ctrough (mg/L)", colour ="Subject") +theme_minimal()```---## Method 1: Monoexponential (`pk.tss.monoexponential`)Fits a monoexponential approach-to-plateau model:$$C_{\text{trough}}(n) = C_{ss} \cdot \left(1 - e^{-k_{\text{tss}} \cdot n}\right)$$Reports TSS as the dose occasion at which the predicted concentration reaches a specified fraction of Css (default: 90% = `tss.fraction = 0.9`).Returns population, population-individual (popind), individual, and pooled single-model estimates (`single` fits one model to all data, ignoring subject differences).```{r}tss_mono <-pk.tss.monoexponential(conc = d_tss$ctrough,time = d_tss$dose_number,subject = d_tss$Subject,time.dosing =1:n_doses)tss_mono```**Interpreting the output columns:**| Column | Meaning ||---|---||`tss.monoexponential.population`| TSS from population-level fit (one value shared across subjects) ||`tss.monoexponential.popind`| TSS from mixed model with subject-level random effect for TSS (NA if not supported by data) ||`tss.monoexponential.individual`| TSS from individual-level fits ||`tss.monoexponential.single`| TSS ignoring between-subject variability |### Changing the fraction thresholdA stricter 95% definition of steady state gives a later TSS:```{r}# 95% of Csspk.tss.monoexponential(conc = d_tss$ctrough,time = d_tss$dose_number,subject = d_tss$Subject,time.dosing =1:n_doses,tss.fraction =0.95)```---## Method 2: Stepwise linear (`pk.tss.stepwise.linear`)A non-parametric approach: iteratively tests whether concentrations are still increasing linearly from dose occasion $k$ onward. TSS is the earliest dose occasion at which the upward trend is no longer statistically significant.This method is more robust when the rise to steady state is irregular or non-monoexponential.```{r}tss_linear <-pk.tss.stepwise.linear(conc = d_tss$ctrough,time = d_tss$dose_number,subject = d_tss$Subject,time.dosing =1:n_doses)tss_linear```The result is a data frame with a `tss.stepwise.linear` column containing the first dose occasion number where concentrations are deemed flat (or `NA` if steady state cannot be determined from the data).---## Running both methods (`pk.tss`)`pk.tss()` runs both methods and returns results side by side:```{r}tss_combined <-pk.tss(conc = d_tss$ctrough,time = d_tss$dose_number,subject = d_tss$Subject,time.dosing =1:n_doses)tss_combined```---## Key arguments| Argument | Default | Applies to | Meaning ||---|---|---|---||`conc`| — | both | Trough concentrations (one per dose occasion per subject) ||`time`| — | both | Dose occasion numbers or actual clock times ||`subject`| — | both | Subject identifiers ||`time.dosing`| — | both | Every dosing time; concentrations at these times are treated as the trough observations the models fit ||`type`|`c("monoexponential", "stepwise.linear")`|`pk.tss` wrapper | Which method(s) to run — both by default ||`tss.fraction`|`0.9`| monoexponential | Fraction of Css that defines "at steady state" ||`output`|`c("population","popind","individual","single")`| monoexponential | Which output types to return ||`min.points`|`3`| stepwise linear | Fewest dose occasions a linear model is fit to ||`level`|`0.95`| stepwise linear | Confidence level for the test of a nonzero slope ||`verbose`|`FALSE`| both | Print model fitting details |## When the models do not fitBoth methods fit models, and the fits can fail when the troughs do not support them. That happens, for example, when the troughs are already flat from the first dose, are very noisy, or come from too few subjects or occasions. The warnings say which estimate is affected:- `nlme` warnings such as "nlminb() did not converge" or "Singular precision matrix" come from the population models that `pk.tss.monoexponential()` tries: random effects on Ctrough,ss and TSS, on TSS only, or on Ctrough,ss only. The best converged model by AIC is used.- `pknca_warning_tss_popind_no_random_effect`: the best population model has no random effect on TSS, so `tss.monoexponential.popind` is `NA`.- `pknca_warning_tss_population_no_convergence`: no population model converged, so `tss.monoexponential.population` and `tss.monoexponential.popind` are `NA`.- `pknca_warning_tss_stepwise_fit_failed` (≥ 0.13.0): steady state was not found and some stepwise linear fits failed. The warning names the start times that were skipped; before 0.13.0 the `NA` was silent.The simulated data above rise over several doses, so every model fits without a warning. Treat any of these warnings as a sign to plot the troughs and check that the design can show the approach to steady state.> **Note:** TSS estimation requires **multiple dose occasions with consistent trough sampling**. It is not applicable to single-dose studies or studies where trough collection was inconsistent.---::: {.callout-note icon=false appearance="minimal"}**pkgdown reference:** [pk.tss()](https://humanpred.github.io/pknca/reference/pk.tss.html) · [pk.tss.monoexponential()](https://humanpred.github.io/pknca/reference/pk.tss.monoexponential.html) · [pk.tss.stepwise.linear()](https://humanpred.github.io/pknca/reference/pk.tss.stepwise.linear.html):::