-
Notifications
You must be signed in to change notification settings - Fork 1
Appendices
Contents | Previous: Part V: Computation, benchmarks, diagnostics
Each displayed equation maps to the package code that implements it. The
locations refer to the development version of mlumr; search for the
quoted expression if the file has moved.
Table 9: Equation-to-code crosswalk.
| Equation | What it says | Code location |
|---|---|---|
| Equation 13 | IPD GLM, |
inst/stan/mlumr_binary_spfa.stan (transformed parameters, eta_ipd) |
| Equation 21, Equation 25 | binomial AgD, |
inst/stan/include/binary_functions.stan: integrated_binomial_lpmf()
|
| Equation 26 | normal AgD likelihood |
mlumr_normal_spfa.stan: y_agd[k] ~ normal(theta_agd_bar, se_agd[k])
|
| Equation 27 | Poisson AgD log-sum-exp |
mlumr_poisson_spfa.stan: log_lambda_agd_bar
|
| Equation 29, Table 6 | survival likelihood by status |
inst/stan/include/survival_functions.stan (surv_ll_status) |
| Equation 33 | integrated pseudo-IPD likelihood |
mlumr_survival_spfa.stan: agd_ll[j] = log_sum_exp(ll) - log(n_int)
|
| Equation 31, Equation 32 | M-spline hazard, simplex |
mlumr_survival_mspline_spfa.stan: scoef = softmax(append_row(0, lscoef))
|
| Equation 22, Equation 23 | Sobol, copula, quantile transform |
R/integration.R: .generate_copula_uniforms() (Sobol points, Cholesky factor of .transform_integration_points()
|
| Equation 24 | Spearman to copula correlation |
R/utils.R: cor_adjust_spearman()
|
| Equation 38 | covariate centering |
R/mlumr.R: .mlumr_center_covariates()
|
| Equation 39 | thin QR reparameterization |
R/mlumr.R: .mlumr_qr_design(); Stan allbeta = R_inv * beta_tilde
|
| Equation 36 | LOR (always logit), RD, RR |
mlumr_binary_spfa.stan (generated quantities, lor_* from the log event and non-event probabilities) |
| Equation 37 | survivor-weighted marginal hazard |
survival_functions.stan: log_mean_haz(); survival_mspline_functions.stan: mspline_log_mean_haz()
|
| RMST (Section 14.4) | trapezoidal rule on |
survival_functions.stan: rmst_param(); survival_mspline_functions.stan: mspline_rmst()
|
| Equation 42 | DIC, |
R/diagnostics.R: pD <- 0.5 * var(D)
|
| Equation 41, Equation 40 | naive contrasts, delta method | R/naive.R |
| (STC standardization) | Comparator-population G-computation | R/stc.R |
Table 10: Notation used in this document.
| Symbol | Meaning |
|---|---|
|
|
outcome and covariate vector of IPD patient |
| number of covariates | |
| index and comparator treatment intercepts | |
| shared prognostic coefficient vector (SPFA) | |
| treatment-specific coefficients (relaxed) | |
| effect modification, |
|
| linear predictor |
|
|
|
link and inverse-link function |
| comparator covariate density | |
|
|
integration point n_int) |
| model-implied comparator mean outcome (Equation 21) | |
| average comparator event probability (Equation 25) | |
|
|
copula correlation matrix, Spearman correlation |
| survival, hazard, cumulative hazard | |
|
|
baseline hazard, M-spline and I-spline basis |
|
|
spline simplex coefficients, smoothing scale |
| residual SD (normal family) | |
|
|
deviance, effective number of parameters |
|
|
thin QR factors of the design matrix |
All nine parametric survival distributions, with the linear predictor
Table 11: The nine parametric survival distributions.
| Distribution | Type | Survival |
Hazard |
|---|---|---|---|
| Exponential | PH | ||
| Weibull | PH | ||
| Gompertz | PH | ||
| Exponential | AFT | ||
| Weibull | AFT | ||
| Log-normal | AFT | ||
| Log-logistic | AFT | ||
| Gamma | AFT | ||
| Generalized gamma | AFT | (three-parameter; see flexsurv) |
Every code chunk in this document runs on base R plus three packages
that are already mlumr dependencies: ggplot2, randtoolbox, and
splines2 (the M-spline figure also uses patchwork if available). No
chunk fits a Stan model or calls mlumr itself, so the document renders
in seconds. Every chunk that uses randomness sets set.seed(2026) for
exact reproducibility.
To render:
quarto render mathematical-foundations.qmdsessionInfo()R version 4.6.0 (2026-04-24)
Platform: aarch64-apple-darwin23
Running under: macOS 27.0
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRlapack.dylib; LAPACK version 3.12.1
locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
time zone: America/Toronto
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] splines2_0.5.4 randtoolbox_2.0.5 rngWELL_0.10-10 ggplot2_4.0.3
loaded via a namespace (and not attached):
[1] gtable_0.3.6 jsonlite_2.0.0 dplyr_1.2.1 compiler_4.6.0
[5] tidyselect_1.2.1 Rcpp_1.1.2 scales_1.4.0 yaml_2.3.12
[9] fastmap_1.2.0 R6_2.6.1 labeling_0.4.3 generics_0.1.4
[13] patchwork_1.3.2 isoband_0.3.0 knitr_1.51 tibble_3.3.1
[17] pillar_1.11.1 RColorBrewer_1.1-3 rlang_1.3.0 xfun_0.60
[21] S7_0.2.2 otel_0.2.0 cli_3.6.6 withr_3.0.3
[25] magrittr_2.0.5 digest_0.6.39 grid_4.6.0 lifecycle_1.0.5
[29] vctrs_0.7.3 evaluate_1.0.5 glue_1.8.1 farver_2.1.2
[33] rmarkdown_2.32 tools_4.6.0 pkgconfig_2.0.3 htmltools_0.5.9
Bucher, Heiner C., Gordon H. Guyatt, Lauren E. Griffith, and Stephen D. Walter. 1997. “The Results of Direct and Indirect Treatment Comparisons in Meta-Analysis of Randomized Controlled Trials.” Journal of Clinical Epidemiology 50 (6): 683–91. https://doi.org/10.1016/s0895-4356(97)00049-8.
Caflisch, Russel E. 1998. “Monte Carlo and Quasi-Monte Carlo Methods.” Acta Numerica 7: 1–49. https://doi.org/10.1017/S0962492900002804.
Carpenter, Bob, Andrew Gelman, Matthew D. Hoffman, Daniel Lee, Ben Goodrich, Michael Betancourt, Marcus A. Brubaker, Jiqiang Guo, Peter Li, and Allen Riddell. 2017. “Stan: A Probabilistic Programming Language.” Journal of Statistical Software 76 (1): 1–32. https://doi.org/10.18637/jss.v076.i01.
Chandler, C., and K. J. Ishak. 2025. “Anchors Away: Navigating Unanchored Indirect Comparisons with Multilevel Unanchored Meta-Regression.” ISPOR Europe, Glasgow, UK; abstract MSR28.
———. 2026. “Surviving Unanchored Indirect Comparisons: An Extension of Multilevel Unanchored Meta-Regression (ML-UMR) for Survival Analyses.” ISPOR, Philadelphia, PA, USA; abstract MSR131; Value in Health.
Dias, S., N. J. Welton, A. J. Sutton, and A. E. Ades. 2011. “NICE DSU Technical Support Document 2: A Generalised Linear Modelling Framework for Pair-Wise and Network Meta-Analysis of Randomised Controlled Trials.” National Institute for Health and Care Excellence. https://sheffield.ac.uk/nice-dsu.
Gelman, Andrew, John B. Carlin, Hal S. Stern, and Donald B. Rubin. 2004. Bayesian Data Analysis. 2nd ed. Chapman; Hall/CRC.
Gelman, Andrew, Aleks Jakulin, Maria Grazia Pittau, and Yu-Sung Su. 2008. “A Weakly Informative Default Prior Distribution for Logistic and Other Regression Models.” The Annals of Applied Statistics 2 (4): 1360–83. https://doi.org/10.1214/08-AOAS191.
Guyot, Patricia, A. E. Ades, Mario J. N. M. Ouwens, and Nicky J. Welton. 2012. “Enhanced Secondary Analysis of Survival Data: Reconstructing the Data from Published Kaplan-Meier Survival Curves.” BMC Medical Research Methodology 12: 9. https://doi.org/10.1186/1471-2288-12-9.
Hoffman, Matthew D., and Andrew Gelman. 2014. “The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo.” Journal of Machine Learning Research 15: 1593–623.
Jackson, Christopher. 2023. “survextrap: A Package for Flexible and Transparent Survival Extrapolation.” BMC Medical Research Methodology 23: 282. https://doi.org/10.1186/s12874-023-02094-1.
Joe, Stephen, and Frances Y. Kuo. 2008. “Constructing Sobol’ Sequences with Better Two-Dimensional Projections.” SIAM Journal on Scientific Computing 30 (5): 2635–54. https://doi.org/10.1137/070709359.
Kurowicka, Dorota, and Roger M. Cooke. 2006. Uncertainty Analysis with High Dimensional Dependence Modelling. Wiley. https://doi.org/10.1002/0470863072.
Leahy, Joy, and Cathal Walsh. 2019. “Assessing the Impact of a Matching-Adjusted Indirect Comparison in a Bayesian Network Meta-Analysis.” Research Synthesis Methods 10 (4): 546–68. https://doi.org/10.1002/jrsm.1372.
Lebrun, Régis, and Anne Dutfoy. 2009. “An Innovating Analysis of the Nataf Transformation from the Copula Viewpoint.” Probabilistic Engineering Mechanics 24 (3): 312–20. https://doi.org/10.1016/j.probengmech.2008.08.001.
Phillippo, D. M., A. E. Ades, S. Dias, S. Palmer, K. R. Abrams, and N. J. Welton. 2016. “NICE DSU Technical Support Document 18: Methods for Population-Adjusted Indirect Comparisons in Submissions to NICE.” NICE Decision Support Unit. https://sheffield.ac.uk/nice-dsu.
Phillippo, D. M., S. Dias, A. E. Ades, M. Belger, A. Brnabic, A. Schacht, D. Saure, Z. Kadziola, and N. J. Welton. 2020. “Multilevel Network Meta-Regression for Population-Adjusted Treatment Comparisons.” Journal of the Royal Statistical Society: Series A (Statistics in Society) 183 (3): 1189–1210. https://doi.org/10.1111/rssa.12579.
Phillippo, D. M., A. Sadek, H. Pedder, and N. J. Welton. 2026. “Network Meta-Analysis of Survival Outcomes with Non-Proportional Hazards Using Flexible M-splines.” Statistics in Medicine 45 (18–19): e70695. https://doi.org/10.1002/sim.70695.
Phillippo, David M. 2019. “Calibration of Treatment Effects in Network Meta-Analysis Using Individual Patient Data.” PhD thesis, University of Bristol.
Phillippo, David M., A. E. Ades, Sofia Dias, Stephen Palmer, Keith R. Abrams, and Nicky J. Welton. 2018. “Methods for Population-Adjusted Indirect Comparisons in Health Technology Appraisal.” Medical Decision Making 38 (2): 200–211. https://doi.org/10.1177/0272989X17725740.
Ramsay, J. O. 1988. “Monotone Regression Splines in Action.” Statistical Science 3 (4): 425–41. https://doi.org/10.1214/ss/1177012761.
Remiro-Azocar, Antonio, Anna Heath, and Gianluca Baio. 2021. “Methods for Population Adjustment with Limited Access to Individual Patient Data: A Review and Simulation Study.” Research Synthesis Methods 12 (6): 750–75. https://doi.org/10.1002/jrsm.1511.
———. 2022. “Parametric g-Computation for Compatible Indirect Treatment Comparisons with Limited Individual Patient Data.” Research Synthesis Methods 13 (6): 716–44. https://doi.org/10.1002/jrsm.1565.
Ren, Shijie, Sa Ren, Nicky J. Welton, and Mark Strong. 2024. “Advancing Unanchored Simulated Treatment Comparisons: A Novel Implementation and Simulation Study.” Research Synthesis Methods 15 (4): 657–70. https://doi.org/10.1002/jrsm.1718.
Royston, Patrick, and Mahesh K. B. Parmar. 2002. “Flexible Parametric Proportional-Hazards and Proportional-Odds Models for Censored Survival Data, with Application to Prognostic Modelling and Estimation of Treatment Effects.” Statistics in Medicine 21 (15): 2175–97. https://doi.org/10.1002/sim.1203.
Signorovitch, James E., Eric Q. Wu, Andrew P. Yu, Charles M. Gerrits, Evan Kantor, Yanjun Bao, Shiraz R. Gupta, and Parvez M. Mulani. 2010. “Comparative Effectiveness Without Head-to-Head Trials: A Method for Matching-Adjusted Indirect Comparisons Applied to Psoriasis Treatment with Adalimumab or Etanercept.” PharmacoEconomics 28 (10): 935–45. https://doi.org/10.2165/11538370-000000000-00000.
Sklar, Abe. 1959. “Fonctions de répartition à n Dimensions Et Leurs Marges.” Publications de l’Institut de Statistique de l’Université de Paris 8: 229–31.
Sobol’, I. M. 1967. “On the Distribution of Points in a Cube and the Approximate Evaluation of Integrals.” USSR Computational Mathematics and Mathematical Physics 7 (4): 86–112. https://doi.org/10.1016/0041-5553(67)90144-9.
Spiegelhalter, David J., Nicola G. Best, Bradley P. Carlin, and Angelika van der Linde. 2002. “Bayesian Measures of Model Complexity and Fit.” Journal of the Royal Statistical Society: Series B (Statistical Methodology) 64 (4): 583–639. https://doi.org/10.1111/1467-9868.00353.
Vehtari, Aki, Andrew Gelman, and Jonah Gabry. 2017. “Practical Bayesian Model Evaluation Using Leave-One-Out Cross-Validation and WAIC.” Statistics and Computing 27 (5): 1413–32. https://doi.org/10.1007/s11222-016-9696-4.
Vehtari, Aki, Andrew Gelman, Daniel Simpson, Bob Carpenter, and Paul-Christian Bürkner. 2021. “Rank-Normalization, Folding, and Localization: An Improved Rhat for Assessing Convergence of MCMC.” Bayesian Analysis 16 (2): 667–718. https://doi.org/10.1214/20-BA1221.
Contents | Previous: Part V: Computation, benchmarks, diagnostics
- 1 What problem mlumr solves
- 2 The math toolbox
- 3 The probability distributions mlumr uses
- 4 Regression, link functions, and likelihood
- 5 Bayesian inference
Part II: The indirect comparison problem
- 8 From STC and ML-NMR to ML-UMR
- 9 The integration pipeline: building the points
- 10 The aggregate likelihoods, family by family
- 11 Survival analysis from zero
- 12 Priors: the location-scale-df contract
- 13 The joint posterior, assembled