if (!exists("meta") || is.null(meta)) meta <- packageDescription("spOccupancy")

citHeader("To cite package", sQuote(meta$Package), "in publications, please cite the Doser, Finley, Kéry, Zipkin (2022) paper. If using functions lfJSDM, sfJSDM, lfMsPGOcc, or sfMsPGOcc, please also cite the Doser, Finley, Banerjee (2023) paper that introduces this functionality. If using any spatially-varying coefficient function, please cite the Doser, Finley, Saunders, Kéry, Weed, Zipkin (2024) paper:")

year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date, perl = TRUE)
vers <- paste("R package version", meta$Version)

bibentry(bibtype = "Article",
  title        = "{spOccupancy}: An R package for single-species, multi-species, and integrated spatial occupancy models",
  author       = c(as.person("Jeffrey W. Doser"), as.person("Andrew O. Finley"), as.person("Marc Kéry"), as.person("Elise F. Zipkin")),
  journal      = "Methods in Ecology and Evolution",
  year         = "2022",
  volume       = "13",
  number       = "",
  pages        = "1670-1678",
  url          = "https://doi.org/10.1111/2041-210X.13897",

  textVersion  =
  paste("Doser, J. W., Finley A. O., Kéry, M., & Zipkin E. F. (2022).",
        "spOccupancy: An R package for single-species, multi-species, and integrated spatial occupancy models",
        "Methods in Ecology and Evolution, 13, 1670-1678. https://doi.org/10.1111/2041-210X.13897")
)

citHeader("")

bibentry(bibtype = "Article",
  title        = "Joint species distribution models with imperfect detection for high-dimensional spatial data",
  author       = c(as.person("Jeffrey W. Doser"), as.person("Andrew O. Finley"), as.person("Sudipto Banerjee")),
  journal      = "Ecology",
  year         = "2023",
  volume       = "",
  number       = "",
  pages        = "e4137",
  url          = "https://doi.org/10.1002/ecy.4137",

  textVersion  =
  paste("Doser, J. W., Finley A. O., & Banerjee, S. (2023).",
        "Joint species distribution models with imperfect detection for high-dimensional spatial data",
        "Ecology e4137. https://doi.org/10.1002/ecy.4137")
)

bibentry(bibtype = "Article",
  title        = "Modeling complex species-environment relationships through spatially-varying coefficient occupancy models",
  author       = c(as.person("Jeffrey W. Doser"), as.person("Andrew O. Finley"), as.person("Sarah P. Saunders"), as.person("Marc Kéry"), as.person("Aaron S. Weed"), as.person("Elise F. Zipkin")),
  journal      = "Journal of Agricultural, Biological, and Environmental Statistics",
  year         = "2024",
  volume       = "",
  number       = "",
  pages        = "",
  url          = "https://doi.org/10.1007/s13253-023-00595-6",

  textVersion  =
  paste("Doser, J. W., Finley A. O., Saunders, S. P., Kéry, M., Weed, A. S., Zipkin, E. F. (2024).",
        "Modeling complex species-environment relationships through spatially-varying coefficient occupancy models",
        "Journal of Agricultural, Biological, and Environmental Statistics. https://doi.org/10.1007/s13253-023-00595-6")
)
