# The version and year come from the installed DESCRIPTION: the publication
# date for a CRAN release, else the build date, else the current year.
ver <- meta$Version
if (is.null(ver) || !nzchar(ver)) ver <- "0.2.1"
year_in <- function(x) {
  if (!length(x) || is.na(x)) return(character(0))
  regmatches(x, regexpr("[0-9]{4}(?=-[0-9]{2}-[0-9]{2})", x, perl = TRUE))
}
year <- c(year_in(meta$`Date/Publication`), year_in(meta$Packaged),
          year_in(meta$Built), format(Sys.Date(), "%Y"))[1]

bibentry(
  bibtype  = "Misc",
  key      = "chandler2026mlumr",
  title    = "Anchors Away: Navigating Single-Arm Indirect Comparisons with Multilevel Unanchored Meta-Regression ({ML-UMR-SA})",
  author   = c(
    person("Conor", "Chandler"),
    person(c("K.", "Jack"), "Ishak")
  ),
  year     = "2026",
  note     = "arXiv preprint arXiv:2606.20341 [stat.ME]",
  doi      = "10.48550/arXiv.2606.20341",
  header   = "To cite the ML-UMR methodology, please use:"
)

bibentry(
  bibtype  = "Manual",
  key      = "sofimahmudi2026mlumr",
  title    = "{mlumr}: Multilevel Unanchored Meta-Regression for Indirect Treatment Comparisons",
  author   = c(
    person("Ahmad", "Sofi-Mahmudi",
           comment = c(ORCID = "0000-0001-6829-0823")),
    person("Conor", "Chandler",
           comment = c(ORCID = "0000-0002-1365-9002"))
  ),
  year     = year,
  note     = paste("R package version", ver),
  doi      = "10.5281/zenodo.23341927",
  url      = "https://CRAN.R-project.org/package=mlumr",
  header   = "To cite the mlumr software, please use:"
)

bibentry(
  bibtype  = "Article",
  key      = "chandler2025msr28",
  title    = "Anchors Away: Navigating Unanchored Indirect Comparisons With Multilevel Unanchored Meta-Regression ({ML-UMR})",
  author   = c(
    person("Conor", "Chandler"),
    person("Jack", "Ishak")
  ),
  journal  = "Value in Health",
  year     = "2025",
  volume   = "28",
  number   = "12",
  pages    = "S498",
  doi      = "10.1016/j.jval.2025.09.3319",
  note     = "Conference abstract MSR28, ISPOR Europe 2025",
  header   = "Conference abstracts on ML-UMR:"
)

bibentry(
  bibtype  = "Article",
  key      = "chandler2026msr131",
  title    = "Surviving Unanchored Indirect Comparisons: An Extension of Multilevel Unanchored Meta-Regression ({ML-UMR}) for Survival Analyses",
  author   = c(
    person("Conor", "Chandler"),
    person("Jack", "Ishak")
  ),
  journal  = "Value in Health",
  year     = "2026",
  volume   = "29",
  number   = "6",
  pages    = "S324",
  doi      = "10.1016/j.jval.2026.03.1630",
  note     = "Conference abstract MSR131, ISPOR 2026"
)

bibentry(
  bibtype  = "Article",
  key      = "phillippo2020mlnmr",
  title    = "Multilevel Network Meta-Regression for Population-Adjusted Treatment Comparisons",
  author   = c(
    person(c("David", "M."), "Phillippo"),
    person("Sofia", "Dias"),
    person(c("A.", "E."), "Ades"),
    person("Mark", "Belger"),
    person("Alan", "Brnabic"),
    person("Alexander", "Schacht"),
    person("Daniel", "Saure"),
    person("Zbigniew", "Kadziola"),
    person(c("Nicky", "J."), "Welton")
  ),
  journal  = "Journal of the Royal Statistical Society: Series A (Statistics in Society)",
  year     = "2020",
  volume   = "183",
  number   = "3",
  pages    = "1189--1210",
  doi      = "10.1111/rssa.12579",
  header   = "Multilevel network meta-regression, on which ML-UMR builds:"
)

bibentry(
  bibtype  = "Manual",
  key      = "phillippo2020multinma",
  title    = "{multinma}: Bayesian Network Meta-Analysis of Individual and Aggregate Data",
  author   = person(c("David", "M."), "Phillippo",
                    comment = c(ORCID = "0000-0003-2672-7841")),
  year     = "2020",
  note     = "R package",
  doi      = "10.5281/zenodo.3904454",
  url      = "https://CRAN.R-project.org/package=multinma"
)
