---
title: "Certolizumab (Wade 2015)"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Certolizumab (Wade 2015)}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment  = "#>"
)
```

```{r setup}
library(nlmixr2lib)
library(PKNCA)
library(rxode2)
library(dplyr)
library(tidyr)
library(ggplot2)
```

# Model and source

```{r model-header, echo = FALSE, results = "asis"}
mod <- rxode2::rxode(readModelDb("Wade_2015_certolizumab"))
cat("* **Citation:** ", mod$reference, "\n", sep = "")
cat("* **Description:** ", mod$description, "\n", sep = "")
```

* **Article:** <https://doi.org/10.1002/jcph.491>

# Population

Wade 2015 pooled certolizumab pegol (CZP) PK data from 2157 adults with
moderately-to-severely active Crohn's disease across nine clinical studies
(C87005, C87031, C87032, C87037, C87042, C87043, C87047, C87048, C87085). The
total dataset contained 13,561 CZP concentrations (median 6 samples per
subject; range 1 to 17). Baseline demographics from Wade 2015 Table 2: age
range 16-80 years (median 35), body weight 31-151 kg (median 65), BMI
13-56 kg/m^2 (median 23), BSA 1.2-2.7 m^2 (median 1.8), 55.5% female. Race
composition: 1964 White (91.1%), 89 Japanese (4.1%), 42 Other (1.9%), 29
Black (1.3%), 17 Indian (0.8%), 11 Asian (0.5%), 5 Hispanic (0.2%).
Baseline laboratory medians: albumin 41 g/L, CRP 8 mg/L, lymphocyte count
1.5 x 10^9/L, SCORE_CDAI 290. Immunosuppressant use at baseline in 889/2157
subjects (41.2%). Anti-CZP antibodies (ADA) were detected in 139 subjects
(6.4%), contributing 270 ADA-positive concentrations (2.0% of the total
observations). Dosing regimens pooled into the analysis included 100, 200, or
400 mg SC Q2W or Q4W.

The same information is available programmatically via
`readModelDb("Wade_2015_certolizumab")$population`.

# Source trace

The per-parameter origin is recorded as an in-file comment next to each
`ini()` entry in
`inst/modeldb/specificDrugs/Wade_2015_certolizumab.R`. The table below
collects them in one place for review.

| Equation / parameter | Value            | Source location (Wade 2015)                          |
|----------------------|------------------|------------------------------------------------------|
| `lka`                | `log(0.200)`     | Table 3 (theta1): KA = 0.200 /day                    |
| `lcl`                | `log(0.685)`     | Table 3 (theta2): CL/F, ATB-ve = 0.685 L/day         |
| `lvc`                | `log(7.61)`      | Table 3 (theta3): V/F = 7.61 L                       |
| `lbaseline`          | `log(1.23)`      | Table 3 (theta4): Baseline = 1.23 ug/mL              |
| `e_ada_cl`           | `2.74/0.685 - 1` | Table 3 (theta5 = 2.74 L/day vs theta2 = 0.685 L/day; ~3.0 fractional increase) |
| `e_alb_lo_cl`        | `-0.0598`        | Table 3 (theta7): ALB on CL, ALB <= 41 g/L           |
| `e_alb_hi_cl`        | `-0.0177`        | Table 3 (theta8): ALB on CL, ALB > 41 g/L            |
| `e_crp_lo_cl`        | ` 0.0205`        | Table 3 (theta10): CRP on CL, CRP <= 8 mg/L          |
| `e_crp_hi_cl`        | ` 0.000561`      | Table 3 (theta11): CRP on CL, CRP > 8 mg/L           |
| `e_bsa_cl`           | ` 0.715`         | Table 3 (theta9): BSA on CL, per m^2 centered at 1.76 |
| `e_bsa_vc`           | ` 0.656`         | Table 3 (theta12): BSA on V, per m^2 centered at 1.76 |
| `e_japanese_vc`      | `-0.250`         | Table 3 (theta13): RACE(J) on V (Japanese)           |
| `e_black_vc`         | ` 0.265`         | Table 3 (theta14): RACE(B) on V (Black)              |
| `e_asian_vc`         | ` 0.415`         | Table 3 (theta15): RACE(A) on V (Asian)              |
| IIV KA (`etalka`)    | `log(1+0.501^2)` | Table 3: IIV KA CV = 50.1%                           |
| IIV CL/F (`etalcl`)  | `log(1+0.275^2)` | Table 3: IIV CL/F (ADA-) CV = 27.5% (ADA+ CV = 83.6%) |
| IIV V/F (`etalvc`)   | `log(1+0.167^2)` | Table 3: IIV V/F CV = 16.7%                          |
| IIV baseline (`etalbaseline`) | `log(1+0.951^2)` | Table 3: IIV baseline (ADA-) CV = 95.1% (ADA+ CV = 72.3%) |
| `propSd`             | `0.346`          | Table 3 (theta6): proportional residual = 34.6% (additive on Ln scale) |
| CL/F composite       | `((1-ATB)*theta2 + ATB*theta5) * CL_ALB * CL_CRP * (1 + theta9*(BSA-1.76))` | Table 3 footnote |
| V/F composite        | `theta3 * VRACE * (1 + theta12*(BSA-1.76))`                 | Table 3 footnote |
| CL_ALB               | `(1 + theta7*(ALB-41))` for ALB <= 41; `(1 + theta8*(ALB-41))` otherwise | Table 3 footnote |
| CL_CRP               | `(1 + theta10*(CRP-8))` for CRP <= 8; `(1 + theta11*(CRP-8))` otherwise  | Table 3 footnote |
| VRACE                | `1 + theta13*JPN + theta14*BLK + theta15*ASI` (pooled ref = White/Indian/Hispanic/Other) | Table 3 footnote |

Reference covariate values for typical-subject predictions: BSA = 1.76 m^2,
ALB = 41 g/L, CRP = 8 mg/L, ADA-negative, race = reference (White / Indian
Asian / Hispanic / Other).

The paper reports derived typical half-lives that we use as external
validation targets:

* Absorption half-life: ~3.5 days (Results, "Final Population Pharmacokinetic Model" section).
* Elimination half-life in ADA-negative patients: ~8 days (same section).
* Elimination half-life in ADA-positive patients: ~2 days (same section).

# Virtual cohort

Individual observed data are not public. The simulations below build a
virtual cohort whose covariate distributions approximate Wade 2015 Table 2.

```{r make-cohort}
make_cohort <- function(n,
                        n_doses = 6,
                        dosing_interval_days = 28,
                        obs_days_per_dose = c(0, 1, 2, 3, 5, 7, 10, 14, 21, 28),
                        amt_mg = 400,
                        seed = 20152015) {
  set.seed(seed)

  # Baseline covariates approximating Wade 2015 Table 2.
  BSA <- pmax(1.2, pmin(2.7, rnorm(n, 1.8, 0.2)))
  ALB <- pmax(17,  pmin(52,  rnorm(n, 41, 5)))
  CRP <- pmax(0.1, pmin(286, exp(rnorm(n, log(8), 1.4))))

  # Race distribution matches Table 2 percentages. RACE_JAPANESE, RACE_BLACK,
  # and RACE_ASIAN are mutually exclusive; all others (White, Indian, Hispanic,
  # Other) fall into the reference group (all three indicators = 0).
  race <- sample(
    c("reference", "japanese", "black", "asian"),
    n, replace = TRUE,
    prob = c((1964 + 17 + 5 + 42) / 2157,  # White + Indian + Hispanic + Other
             89 / 2157,                    # Japanese
             29 / 2157,                    # Black
             11 / 2157)                    # Asian (excluding Japanese)
  )
  RACE_JAPANESE <- as.integer(race == "japanese")
  RACE_BLACK    <- as.integer(race == "black")
  RACE_ASIAN    <- as.integer(race == "asian")

  # Primary cohort is ADA-negative throughout (reference population). An
  # ADA-positive sensitivity arm is built separately below.
  ADA_POS <- 0

  dose_times <- seq(0, (n_doses - 1) * dosing_interval_days,
                    by = dosing_interval_days)

  pop <- data.frame(
    ID = seq_len(n),
    BSA, ALB, CRP,
    RACE_JAPANESE, RACE_BLACK, RACE_ASIAN,
    ADA_POS = ADA_POS
  )

  # Dose records (SC injections to depot)
  d_dose <- pop[rep(seq_len(n), each = length(dose_times)), ] |>
    dplyr::mutate(
      TIME = rep(dose_times, times = n),
      AMT  = amt_mg,
      EVID = 1,
      CMT  = "depot",
      DV   = NA_real_
    )

  # Observation records (concentration sampling in central)
  obs_grid <- sort(unique(as.vector(outer(obs_days_per_dose, dose_times, "+"))))
  d_obs <- pop[rep(seq_len(n), each = length(obs_grid)), ] |>
    dplyr::mutate(
      TIME = rep(obs_grid, times = n),
      AMT  = 0,
      EVID = 0,
      CMT  = "central",
      DV   = NA_real_
    )

  dplyr::bind_rows(d_dose, d_obs) |>
    dplyr::arrange(ID, TIME, dplyr::desc(EVID)) |>
    dplyr::select(ID, TIME, AMT, EVID, CMT, DV,
                  BSA, ALB, CRP,
                  RACE_JAPANESE, RACE_BLACK, RACE_ASIAN, ADA_POS)
}
```

```{r load-model}
mod <- rxode2::rxode(readModelDb("Wade_2015_certolizumab"))
```

# Simulation

The primary simulation uses the approved Crohn's maintenance regimen for
CZP: 400 mg SC Q4W for 6 doses (~24 weeks), with dense sampling in each
dosing interval. ADA-negative patients are the reference population.

```{r simulate-vpc}
events_vpc <- make_cohort(n = 300)
sim_vpc <- rxode2::rxSolve(mod, events = events_vpc) |> as.data.frame()
```

# Replicate published figures

## Figure 1 analogue: concentration-vs-time profiles

Wade 2015 Figure 1 shows CZP concentration versus time after dose across all
studies (linear scale). We reproduce the shape for 400 mg SC Q4W.

```{r fig1-conc-time, fig.width = 7, fig.height = 4}
d_vpc <- sim_vpc |>
  dplyr::group_by(time) |>
  dplyr::summarise(
    Q05 = quantile(Cc, 0.05, na.rm = TRUE),
    Q50 = quantile(Cc, 0.50, na.rm = TRUE),
    Q95 = quantile(Cc, 0.95, na.rm = TRUE),
    .groups = "drop"
  )

ggplot(d_vpc, aes(x = time, y = Q50)) +
  geom_ribbon(aes(ymin = Q05, ymax = Q95), fill = "#4682b4", alpha = 0.25) +
  geom_line(colour = "#4682b4", linewidth = 0.8) +
  geom_line(aes(y = Q05), linetype = "dashed", linewidth = 0.4) +
  geom_line(aes(y = Q95), linetype = "dashed", linewidth = 0.4) +
  scale_x_continuous(breaks = seq(0, 168, by = 28),
                     labels = seq(0, 168, by = 28) / 7) +
  labs(
    x = "Time since first dose (weeks)",
    y = expression("CZP concentration (" * mu * "g/mL)"),
    title = "Figure 1 analogue - simulated CZP concentration VPC",
    caption = paste0(
      "Simulated 5th/50th/95th percentiles, N = 300 virtual subjects, ",
      "400 mg Q4W SC x 6 doses.\n",
      "Replicates the shape of Figure 1 of Wade 2015."
    )
  ) +
  theme_bw()
```

## Figure 2 analogue: covariate effects on CL/F

Wade 2015 Figure 2 shows the nonlinear estimated relationships of albumin
(bottom) and CRP (top) on CL/F, derived from the final model's theta
estimates. We reproduce those relationships using the exact covariate forms
in the model file.

```{r fig2-covariate-effects, fig.width = 7, fig.height = 5}
# Apply the same piecewise-linear form the model uses, at the ADA-negative
# reference subject (BSA = 1.76, so CL is the baseline CL/F = 0.685 L/day).
cl_ref  <- 0.685
alb_grid <- seq(17, 52, length.out = 201)
crp_grid <- seq(0.1, 100, length.out = 201)

cl_alb <- cl_ref * ifelse(
  alb_grid <= 41,
  1 + -0.0598 * (alb_grid - 41),
  1 + -0.0177 * (alb_grid - 41)
)

cl_crp <- cl_ref * ifelse(
  crp_grid <= 8,
  1 + 0.0205 * (crp_grid - 8),
  1 + 0.000561 * (crp_grid - 8)
)

p_alb <- ggplot(data.frame(alb = alb_grid, cl = cl_alb),
                aes(x = alb, y = cl)) +
  geom_line(colour = "#b00000", linewidth = 0.8) +
  geom_vline(xintercept = 41, linetype = "dotted") +
  labs(x = "Albumin (g/L)", y = "CL/F (L/day)",
       title = "Albumin effect on CL/F (ADA-negative reference)") +
  theme_bw()

p_crp <- ggplot(data.frame(crp = crp_grid, cl = cl_crp),
                aes(x = crp, y = cl)) +
  geom_line(colour = "#b00000", linewidth = 0.8) +
  geom_vline(xintercept = 8, linetype = "dotted") +
  labs(x = "CRP (mg/L)", y = "CL/F (L/day)",
       title = "CRP effect on CL/F (ADA-negative reference)") +
  theme_bw()

if (requireNamespace("patchwork", quietly = TRUE)) {
  patchwork::wrap_plots(p_crp, p_alb, ncol = 1)
} else {
  print(p_crp)
  print(p_alb)
}
```

The CL/F values at the 5th/95th percentiles of the covariate ranges match
the values reported in the Results section of Wade 2015:

* Albumin: CL/F falls from ~1.05 L/day (low albumin, ~32 g/L) to ~0.61 L/day
  (high albumin, ~47 g/L); the paper reports 1.05 to 0.613 L/day.
* CRP: CL/F rises from ~0.57 L/day (low CRP, ~1 mg/L) to ~0.71 L/day (high
  CRP, ~79 mg/L); the paper reports 0.574 to 0.712 L/day.

## Figure 3 analogue: ADA-negative vs ADA-positive VPC

Wade 2015 Figure 3 contrasts the VPCs for ADA-negative (left) and
ADA-positive (right) subjects. We reproduce the typical ADA-negative vs
ADA-positive trajectories for a 400 mg SC Q4W regimen.

```{r fig3-ada-compare, fig.width = 7, fig.height = 4}
mod_typical <- mod |> rxode2::zeroRe()

# Reference subject dosing 400 mg Q4W for 6 doses, sampled every day.
ev_ref <- make_cohort(n = 1, obs_days_per_dose = seq(0, 28, by = 1)) |>
  dplyr::mutate(BSA = 1.76, ALB = 41, CRP = 8,
                RACE_JAPANESE = 0, RACE_BLACK = 0, RACE_ASIAN = 0,
                ADA_POS = 0)

ev_adap <- ev_ref |> dplyr::mutate(ADA_POS = 1)

sim_ref  <- rxode2::rxSolve(mod_typical, events = ev_ref)  |>
  as.data.frame() |> dplyr::mutate(arm = "ADA-negative")
sim_adap <- rxode2::rxSolve(mod_typical, events = ev_adap) |>
  as.data.frame() |> dplyr::mutate(arm = "ADA-positive (all samples)")

bind_rows(sim_ref, sim_adap) |>
  ggplot(aes(x = time, y = Cc, colour = arm)) +
  geom_line(linewidth = 0.9) +
  scale_x_continuous(breaks = seq(0, 168, by = 28),
                     labels = seq(0, 168, by = 28) / 7) +
  scale_colour_manual(values = c(`ADA-negative` = "#2c7fb8",
                                 `ADA-positive (all samples)` = "#d95f0e")) +
  labs(
    x = "Time since first dose (weeks)",
    y = expression("Typical Cc (" * mu * "g/mL)"),
    colour = NULL,
    title = "Figure 3 analogue - ADA-negative vs ADA-positive typical subject",
    caption = paste0(
      "Typical subject (BSA = 1.76 m^2, ALB = 41 g/L, CRP = 8 mg/L, reference race).\n",
      "ADA-positive arm sets ADA_POS = 1 at every observation (worst-case sustained positivity)."
    )
  ) +
  theme_bw() +
  theme(legend.position = "top")
```

## Figure S1 analogue: BSA effect at steady state

Wade 2015 Figure S1 shows the influence of BSA on steady-state CZP
concentrations after 400 mg Q4W, for low (1.19 m^2) and high (2.67 m^2) BSA
values in ADA-negative subjects. We reproduce the typical-subject profiles.

```{r figS1-bsa, fig.width = 7, fig.height = 4}
mk_bsa <- function(bsa_value) {
  make_cohort(n = 1, obs_days_per_dose = seq(0, 28, by = 1)) |>
    dplyr::mutate(BSA = bsa_value, ALB = 41, CRP = 8,
                  RACE_JAPANESE = 0, RACE_BLACK = 0, RACE_ASIAN = 0,
                  ADA_POS = 0)
}

sims_bsa <- dplyr::bind_rows(
  rxode2::rxSolve(mod_typical, events = mk_bsa(1.19)) |>
    as.data.frame() |> dplyr::mutate(arm = "BSA = 1.19 m^2"),
  rxode2::rxSolve(mod_typical, events = mk_bsa(1.76)) |>
    as.data.frame() |> dplyr::mutate(arm = "BSA = 1.76 m^2 (typical)"),
  rxode2::rxSolve(mod_typical, events = mk_bsa(2.67)) |>
    as.data.frame() |> dplyr::mutate(arm = "BSA = 2.67 m^2")
)

ggplot(sims_bsa, aes(x = time, y = Cc, colour = arm)) +
  geom_line(linewidth = 0.8) +
  scale_x_continuous(breaks = seq(0, 168, by = 28),
                     labels = seq(0, 168, by = 28) / 7) +
  labs(
    x = "Time since first dose (weeks)",
    y = expression("Typical Cc (" * mu * "g/mL)"),
    colour = NULL,
    title = "Figure S1 analogue - BSA effect on steady-state CZP",
    caption = "Typical ADA-negative subject, 400 mg Q4W SC."
  ) +
  theme_bw() +
  theme(legend.position = "top")
```

# PKNCA validation

Compute NCA on simulated typical-value profiles for the reference patient
(BSA = 1.76 m^2, ALB = 41 g/L, CRP = 8 mg/L, reference race), once in the
ADA-negative arm and once in the ADA-positive arm. The quantities of interest
are the absorption and elimination half-lives, which Wade 2015 reports in
the Results text:

* Absorption half-life: ~3.5 days (independent of ADA status).
* Elimination half-life, ADA-negative: ~8 days.
* Elimination half-life, ADA-positive: ~2 days.

```{r pknca-single-neg}
# Single 400 mg SC dose, dense sampling out to ~56 days (7 ADA-negative
# half-lives) for a clean terminal-phase characterization.
ev_single_neg <- make_cohort(
  n = 1, n_doses = 1,
  obs_days_per_dose = c(0, 0.25, 0.5, 1, 2, 3, 5, 7, 10, 14, 21,
                        28, 35, 42, 49, 56)
) |>
  dplyr::mutate(BSA = 1.76, ALB = 41, CRP = 8,
                RACE_JAPANESE = 0, RACE_BLACK = 0, RACE_ASIAN = 0,
                ADA_POS = 0)

sim_single_neg <- rxode2::rxSolve(mod_typical, events = ev_single_neg) |>
  as.data.frame() |>
  dplyr::mutate(id = 1L, treatment = "single_400mg_ADAneg")

sim_nca_neg <- sim_single_neg |>
  dplyr::filter(!is.na(Cc)) |>
  dplyr::select(id, time, Cc, treatment)

dose_neg <- ev_single_neg |>
  dplyr::filter(EVID == 1) |>
  dplyr::transmute(id = ID, time = TIME, amt = AMT,
                   treatment = "single_400mg_ADAneg")

conc_neg <- PKNCA::PKNCAconc(sim_nca_neg, Cc ~ time | treatment + id)
dose_neg_obj <- PKNCA::PKNCAdose(dose_neg, amt ~ time | treatment + id)

intervals_neg <- data.frame(
  start     = 0,
  end       = Inf,
  cmax      = TRUE,
  tmax      = TRUE,
  aucinf.obs = TRUE,
  half.life = TRUE
)

nca_neg <- PKNCA::pk.nca(
  PKNCA::PKNCAdata(conc_neg, dose_neg_obj, intervals = intervals_neg)
)
knitr::kable(as.data.frame(nca_neg$result),
             caption = "Single-dose NCA on the typical ADA-negative patient.")
```

```{r pknca-single-pos}
# Same single 400 mg SC dose, but ADA-positive at every observation. Dense
# early sampling because the ADA-positive half-life is ~2 days.
ev_single_pos <- make_cohort(
  n = 1, n_doses = 1,
  obs_days_per_dose = c(0, 0.25, 0.5, 1, 2, 3, 5, 7, 10, 14, 21, 28)
) |>
  dplyr::mutate(BSA = 1.76, ALB = 41, CRP = 8,
                RACE_JAPANESE = 0, RACE_BLACK = 0, RACE_ASIAN = 0,
                ADA_POS = 1)

sim_single_pos <- rxode2::rxSolve(mod_typical, events = ev_single_pos) |>
  as.data.frame() |>
  dplyr::mutate(id = 1L, treatment = "single_400mg_ADApos")

sim_nca_pos <- sim_single_pos |>
  dplyr::filter(!is.na(Cc)) |>
  dplyr::select(id, time, Cc, treatment)

dose_pos <- ev_single_pos |>
  dplyr::filter(EVID == 1) |>
  dplyr::transmute(id = ID, time = TIME, amt = AMT,
                   treatment = "single_400mg_ADApos")

conc_pos <- PKNCA::PKNCAconc(sim_nca_pos, Cc ~ time | treatment + id)
dose_pos_obj <- PKNCA::PKNCAdose(dose_pos, amt ~ time | treatment + id)

nca_pos <- PKNCA::pk.nca(
  PKNCA::PKNCAdata(conc_pos, dose_pos_obj, intervals = intervals_neg)
)
knitr::kable(as.data.frame(nca_pos$result),
             caption = "Single-dose NCA on the typical ADA-positive patient.")
```

## Comparison against published half-lives

```{r nca-comparison}
get_param <- function(res, ppname) {
  tbl <- as.data.frame(res$result)
  val <- tbl$PPORRES[tbl$PPTESTCD == ppname]
  if (length(val) == 0) return(NA_real_)
  val[1]
}

hl_neg_sim <- get_param(nca_neg, "half.life")
hl_pos_sim <- get_param(nca_pos, "half.life")

# Model-implied analytical values for comparison.
hl_neg_theory <- log(2) / (0.685 / 7.61)     # ADA-negative KEL = CL/V
hl_pos_theory <- log(2) / (2.74  / 7.61)     # ADA-positive KEL
hl_abs_theory <- log(2) / 0.200              # Absorption

comparison <- data.frame(
  Quantity = c(
    "Absorption half-life (days)",
    "Elimination half-life, ADA-negative (days)",
    "Elimination half-life, ADA-positive (days)"
  ),
  Published = c("~3.5", "~8", "~2"),
  Analytical = c(round(hl_abs_theory, 2),
                 round(hl_neg_theory, 2),
                 round(hl_pos_theory, 2)),
  NCA_simulated = c(
    "n/a (absorption phase)",
    as.character(round(hl_neg_sim, 2)),
    as.character(round(hl_pos_sim, 2))
  )
)
knitr::kable(
  comparison,
  caption = paste0(
    "Half-lives from the packaged model vs. the values reported in Wade 2015 ",
    "Results."
  )
)
```

The analytical half-lives derived from the packaged theta estimates match
the values reported in the Results text of Wade 2015 to within one decimal
place (absorption 3.47 vs ~3.5 days; ADA-negative elimination 7.70 vs ~8
days; ADA-positive elimination 1.93 vs ~2 days). The PKNCA `half.life`
estimates from the simulated profiles may differ slightly because the
terminal-phase log-linear regression picks up curvature from the absorption
phase if the sampling window does not extend far enough past the Cmax.

# Assumptions and deviations

- **Stratified IIV simplified.** Wade 2015 reports separate IIV estimates
  for CL/F and baseline conditional on ADA status (CL/F: ADA-negative 27.5%
  CV, ADA-positive 83.6% CV; baseline: ADA-negative 95.1% CV, ADA-positive
  72.3% CV). nlmixr2 uses a single eta distribution per parameter. The
  packaged model uses the ADA-negative IIVs, which represent the reference
  population (93.6% of subjects, 98.0% of observations). The ADA-positive
  IIVs are documented in the `etalcl` / `etalbaseline` in-file comments for
  users who want to simulate a worst-case ADA-positive arm.
- **Time-varying ADA status.** ADA_POS is supplied per observation in the
  event dataset (Wade 2015 coded ATB at the concentration level, not per
  subject). The primary virtual cohort is ADA-negative at every time point;
  the ADA-positive comparison arm sets ADA_POS = 1 at every observation to
  show the maximum model-predicted effect. Real applications should supply
  the observed per-sample ATB status.
- **Baseline parameter implemented as an additive offset.** Wade 2015
  states that the `Baseline` nuisance parameter captures predose
  concentrations arising either from residual drug from previous anti-TNF
  therapy (the assay cross-reacts with infliximab, adalimumab, and
  golimumab, but not etanercept) or from endogenous anti-TNF antibodies.
  The packaged model adds `baseline` directly to `Cc`, which matches the
  paper's text but is not explicitly documented as an NM-TRAN expression
  in Table 3.
- **Race categories.** Wade 2015 coded RACE as an integer (1 = White,
  2 = Black, 3 = Asian, 4 = Indian, 5 = unused, 6 = Hispanic, 7 = Other,
  8 = Japanese). In the final model Indian (4), Hispanic (6), and Other
  (7) were merged with White (1) into a pooled reference group; Japanese
  (8), Black (2), and Asian (3) each have their own V/F effect. The
  packaged model exposes these as three binary indicators
  (`RACE_JAPANESE`, `RACE_BLACK`, `RACE_ASIAN`); the pooled reference
  group has all three indicators = 0. `RACE_ASIAN` in this model excludes
  Japanese (in Wade 2015's coding the two are separate categories); this
  is documented in the covariate register and in
  `covariateData[[RACE_ASIAN]]$notes`.
- **Virtual covariate distributions.** Exact baseline distributions are
  not published. BSA is simulated as normal(1.8, 0.2) truncated to
  [1.2, 2.7] m^2; ALB as normal(41, 5) truncated to [17, 52] g/L; CRP as
  log-normal with median 8 mg/L and log-SD 1.4 truncated at 286 mg/L to
  match Table 2 ranges. Race fractions are drawn from the Table 2 counts.
- **SC-only dosing.** All Wade 2015 data were subcutaneous. The packaged
  model uses `depot` for the SC dose and treats all structural parameters
  as apparent (CL/F and V/F), so bioavailability is implicit and not
  separately estimated.

# Reference

```{r ref-footer, echo = FALSE, results = "asis"}
cat("* ", mod$reference, "\n", sep = "")
```
