Skip to main content

Example: Published MBMA, naproxen vs placebo

ferx_example("mbma_naproxen") is the published naproxen-vs-placebo case study of Boucher M, Bennetts M, “Many Flavors of Model-Based Meta-Analysis: Part II - Modeling Summary Level Longitudinal Responses”, CPT: Pharmacometrics & Systems Pharmacology 2018;7(5):288-297, doi:10.1002/psp4.12299. Eighteen osteoarthritis trials each report the mean WOMAC pain score of a placebo arm and a naproxen arm over time: 36 arms, 122 arm-by-visit means. The model is a compartment-free Emax time course on the arm mean, with between-study variability on the baseline (E0) and on the maximum effect (Emax), covariate effects of a flare trial design and of naproxen, and each arm mean weighted by its reported standard error. The fit reproduces Table 2 of the paper.

ImportantLicence of the data: CC BY-NC 4.0, not MIT

The data are derived from the article’s supplementary file PSP4-7-288-s007.csv (columns renamed, DV divided by WPSE), licensed CC BY-NC 4.0. They are the one bundled dataset the MIT licence of the ferx R package does not cover. ferx ships them by the authors’ written permission (2026-12-04), which allows distribution with the ferx R package but does not relicense the data: commercial use of the data is not granted. Cite the article above when you use them. Provenance, the modifications made to the original file and its checksums are in the installed package: system.file("COPYRIGHTS", package = "ferx") (section 3) and system.file("examples", "mbma_naproxen", "README.md", package = "ferx"). This page loads the data from the installed package and does not copy them. The model file and the example script are part of the package and are MIT.

The page follows the bundled script, ex_mbma_naproxen.R:

file.edit(system.file("examples", "ex_mbma_naproxen.R", package = "ferx"))

Data

library(ferx)
ex <- ferx_example("mbma_naproxen")
d <- read.csv(ex$data)
head(d)
  ID ARM TIME       DV TRT FLARE      WPSE NIND MDV
1  1   0    0 48.04546   0     1 0.1103122  217   0
2  1   0    2 40.24842   0     1 0.1242285  217   0
3  1   0   12 35.90199   0     1 0.1350900  217   0
4  1   1    0 42.67477   1     1 0.1230235  207   0
5  1   1    2 30.00600   1     1 0.1299740  207   0
6  1   1   12 29.21319   1     1 0.1369245  207   0
c(studies = length(unique(d$ID)), arms = nrow(unique(d[c("ID", "ARM")])))
studies    arms 
     18      36 

One row per arm and visit. ID is the study, so a random effect on ID is between-study variability. ARM and TRT mark the arm (0 = placebo, 1 = naproxen), FLARE a flare-design trial, TIME weeks since randomisation, WPSE the reported standard error of the arm mean and NIND the arm size.

The weighting

DV is not the arm mean: it is the arm mean divided by its standard error, DV = WP / WPSE, and the model divides its prediction by the same WPSE. With the residual variance fixed to 1, each arm mean enters the likelihood with weight 1 / WPSE^2, so a precisely measured arm counts for more. This is the published weighting. The arm mean on its own scale is DV * WPSE:

d$WP <- d$DV * d$WPSE
summary(d$WP)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  2.500   3.872   4.505   4.604   5.250   7.410 

Model

There are no compartments. The Emax time course is the structural model, and the division by WPSE is the weighting, not a unit conversion:

ferx_model_get_section(ex$model, "individual_parameters")
# [individual_parameters]
  E0   = TVE0   + B_E0_FLARE * FLARE + ETA_E0
  EMAX = TVEMAX + B_EMAX_FLARE * FLARE + B_EMAX_TRT * TRT + ETA_EMAX
  ET50 = TVET50 * exp(B_LET50_TRT * TRT)
ferx_model_get_section(ex$model, "structural_model")
# [structural_model]
  # No compartments: the Emax time-course IS the structural model, and the
  # SE division is the MBMA weighting, not a unit conversion.
  EFF = EMAX * TIME / (TIME + ET50)
  y   = (E0 - EFF) / WPSE
ferx_model_get_section(ex$model, "error_model")
# [error_model]
  DV ~ additive(ADD_ERR)

Sign convention. The paper adds a negative Emax to the baseline; this model subtracts a positive EMAX. Every Emax-family estimate here is therefore the negation of the published one: the naproxen effect on Emax is −0.79 in the paper and B_EMAX_TRT ≈ 0.79 here. B_LET50_TRT is the naproxen effect on log ET50, so ET50 for naproxen is TVET50 * exp(B_LET50_TRT).

Fit

fit <- ferx_fit(ex$model, ex$data)
print(fit)
============================================================
 NONLINEAR MIXED EFFECTS MODEL ESTIMATION
============================================================
 Model: mbma_naproxen            Dataset: mbma_naproxen
 Method: FOCEI | Gradient: ANALYTIC | Subjects: 18 | Obs: 122

 STATUS: CONVERGED   32 iterations   0.0s
 OFV: 261.8149    AIC: 279.8149    BIC: 305.0511

MODEL STRUCTURE (auto-derived)
------------------------------------------------------------
  Structural:  compartment-free  (TVE0, TVEMAX, TVET50, B_E0_FLARE, B_EMAX_FLARE, B_EMAX_TRT, B_LET50_TRT)
  IIV:         ETA_E0, ETA_EMAX
  IOV:         none
  Residual:    additive

THETA
------------------------------------------------------------
Parameter            Estimate           SE       %RSE
----------------------------------------------------
TVE0                 5.197214     0.257867        5.0
TVEMAX               1.157998     0.314660       27.2
TVET50               0.690095     0.115434       16.7
B_E0_FLARE           0.962909     0.315448       32.8
B_EMAX_FLARE         0.819736     0.379194       46.3
B_EMAX_TRT           0.792967     0.064572        8.1
B_LET50_TRT         -1.174657     0.271204       23.1

OMEGA  (between-subject variability)
------------------------------------------------------------
  ETA_E0               [additive]   = 0.386234  (SD = 0.6215)  SE = 0.131122  [initial specified as SD]
  ETA_EMAX             [additive]   = 0.545723  (SD = 0.7387)  SE = 0.189086  [initial specified as SD]

SIGMA  (residual error)
------------------------------------------------------------
  ADD_ERR [FIX]    [additive]     = 1.000000  (SD = 1.0000, var = 1.000000)  SE = ---

SHRINKAGE
------------------------------------------------------------
 ETA_E0: 1.3%   ETA_EMAX: 2.4%   EPS: 15.6%

DIAGNOSTICS
------------------------------------------------------------
 Covariance: computed   Cond: 12.5   DW: 1.22 [positive autocorrelation]   IWRES lag-1 r: 0.388

RUN INFO
------------------------------------------------------------
 Gradient (requested): auto   (used: analytic)
 ferx v0.4.0.9000 (core v0.5.0)

SETTINGS  (model file / call-time override)
------------------------------------------------------------
  method                       focei  [model only]
  maxiter                      500  [model only]
  covariance                   true  [model only]

------------------------------------------------------------
 1 warning  --  call ferx_get_warnings(fit) for details
============================================================

The fit warns of positive autocorrelation of the individual weighted residuals (dw_autocorrelation), which is what visits of one arm sharing what the model leaves out would produce. The published model has no between-arm variability, and the model here is the published one, so it has none either. ARM is in the data as the occasion for a between-arm kappa, should you want to add one.

Against the published analysis

Boucher & Bennetts, Table 2, NONMEM column. The Emax-family values are negated to compare like with like, and fit$omega holds variances while the paper reports SDs:

th <- fit$theta
published <- c(
  E0_nonflare      = 5.20,
  dE0_flare        = 0.96,
  Emax_nonflare    = 1.16,   # paper: -1.16
  dEmax_flare      = 0.82,   # paper: -0.82
  dEmax_naproxen   = 0.79,   # paper: -0.79, the headline estimate
  ET50_placebo     = 0.69,
  ET50_naproxen    = 0.21,
  sd_eta_E0        = 0.62,
  sd_eta_Emax      = 0.74
)
ferx_est <- c(
  E0_nonflare      = th[["TVE0"]],
  dE0_flare        = th[["B_E0_FLARE"]],
  Emax_nonflare    = th[["TVEMAX"]],
  dEmax_flare      = th[["B_EMAX_FLARE"]],
  dEmax_naproxen   = th[["B_EMAX_TRT"]],
  ET50_placebo     = th[["TVET50"]],
  ET50_naproxen    = th[["TVET50"]] * exp(th[["B_LET50_TRT"]]),
  sd_eta_E0        = sqrt(fit$omega["ETA_E0", "ETA_E0"]),
  sd_eta_Emax      = sqrt(fit$omega["ETA_EMAX", "ETA_EMAX"])
)
data.frame(published = published, ferx = round(ferx_est, 3),
           difference = round(ferx_est - published, 3))
               published  ferx difference
E0_nonflare         5.20 5.197     -0.003
dE0_flare           0.96 0.963      0.003
Emax_nonflare       1.16 1.158     -0.002
dEmax_flare         0.82 0.820      0.000
dEmax_naproxen      0.79 0.793      0.003
ET50_placebo        0.69 0.690      0.000
ET50_naproxen       0.21 0.213      0.003
sd_eta_E0           0.62 0.621      0.001
sd_eta_Emax         0.74 0.739     -0.001

The headline estimate, the naproxen effect on Emax, with its 95% confidence interval. The paper reports standard errors of 0.06 (BUGS), 0.09 (NONMEM) and 0.07 (nlme) for it:

est <- th[["B_EMAX_TRT"]]
se <- fit$se_theta[["B_EMAX_TRT"]]
round(c(estimate = est, se = se, lower95 = est - 1.96 * se,
        upper95 = est + 1.96 * se), 3)
estimate       se  lower95  upper95 
   0.793    0.065    0.666    0.920 

Typical time courses

The typical arm mean (random effects at 0) for each design and treatment, on the WOMAC scale, beside the observed arm means:

typical <- function(time, trt, flare) {
  e0 <- th[["TVE0"]] + th[["B_E0_FLARE"]] * flare
  emax <- th[["TVEMAX"]] + th[["B_EMAX_FLARE"]] * flare + th[["B_EMAX_TRT"]] * trt
  et50 <- th[["TVET50"]] * exp(th[["B_LET50_TRT"]] * trt)
  e0 - emax * time / (time + et50)
}
weeks <- seq(0, max(d$TIME), length.out = 100)
op <- par(mfrow = c(1, 2))
for (flare in 0:1) {
  sub <- d[d$FLARE == flare, ]
  plot(sub$TIME, sub$WP, col = ifelse(sub$TRT == 1, "firebrick", "grey40"),
       pch = 16, xlab = "Week", ylab = "Mean WOMAC pain",
       main = if (flare == 1) "Flare trials" else "Non-flare trials",
       ylim = range(d$WP))
  lines(weeks, typical(weeks, 0, flare), col = "grey40", lwd = 2)
  lines(weeks, typical(weeks, 1, flare), col = "firebrick", lwd = 2)
  legend("topright", c("placebo", "naproxen"), bty = "n",
         col = c("grey40", "firebrick"), lwd = 2)
}

par(op)

Population predictions

PRED is on the model’s scale, the SE-scaled arm mean, like DV. Multiply by WPSE to read it on the WOMAC scale. The rows follow the data file, so the arm and WPSE are carried across by position:

pred <- ferx_predict(ex$model, ex$data, fit = fit)
head(transform(pred, ARM = d$ARM, PRED_WP = PRED * d$WPSE, WP = d$WP))
  ID TIME     PRED ARM  PRED_WP   WP
1  1    0 55.84263   0 6.160123 5.30
2  1    2 37.75092   0 4.689740 5.00
3  1   12 31.75615   0 4.289939 4.85
4  1    0 50.07273   1 6.160123 5.25
5  1    2 28.13111   1 3.656312 3.90
6  1   12 25.10717   1 3.437786 4.00

See also