citHeader("To cite package 'eRm' in publications use:")
year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date)
vers <- meta$Version
note <- sprintf("R package version %s", meta$Version)

PM  <- person("Patrick", "Mair")
RH  <- person("Reinhold", "Hatzinger")
MJM <- person(c("Marco", "Johannes"), "Maier")
TR  <- person("Thomas", "Rusch")
IK  <- person("Ingrid", "Koller")

# Package Citation
citEntry(
  header = paste0("\n", paste0(rep("#", getOption("width")-1L), collapse=""), "\nThe current Package Version:\n"),
  entry  = "MANUAL",
  title  = "{eRm: Extended Rasch Modeling}",
  author = c(PM, RH, MJM),
  year   = year,
  note   = vers,
  url    = "http://erm.r-forge.r-project.org/",
  textVersion = paste0(
    "Mair, P., Hatzinger, R., & Maier M. J. (",
    year,
    "). eRm: Extended Rasch Modeling. ",
    vers,
    ". http://erm.r-forge.r-project.org/"
  )
)

# JSS 2007
citEntry(
  header  = paste0("\n", paste0(rep("#", getOption("width")-1L), collapse=""), "\nThe original JSS Article:\n"),
  entry   = "ARTICLE",
  title   = "{Extended Rasch modeling: The eRm package for the application of IRT models in R}",
  author  = c(PM, RH),
  year    = 2007,
  page    = "1--20",
  journal = "{Journal of Statistical Software}",
  volume  = 20,
  issue   = 9,
  url     = "http://www.jstatsoft.org/v20/i09",
  textVersion = paste0(
    "Mair, P., & Hatzinger, R. (2007). ",
    "Extended Rasch modeling: The eRm package for the application of IRT models in R. ",
    "Journal of Statistical Software, 20(9), 1-20. ",
    "http://www.jstatsoft.org/v20/i09"
  )
)

# PS 2007
citEntry(
  header  = paste0("\n", paste0(rep("#", getOption("width")-1L), collapse=""), "\nArticle about CML Estimation in eRm:\n"),
  entry   = "ARTICLE",
  title   = "{CML based estimation of extended Rasch models with the eRm package in R}",
  author  = c(PM, RH),
  year    = 2007,
  page    = "26--43",
  journal = "{Psychology Science}",
  volume  = 49,
  issue   = 1,
  textVersion = paste0(
    "Mair, P., & Hatzinger, R. (2007). ",
    "CML based estimation of extended Rasch models with the eRm package in R. ",
    "Psychology Science, 49(1), 26-43."
  )
)

# PSQ 2009
citEntry(
  header  = paste0("\n", paste0(rep("#", getOption("width")-1L), collapse=""), "\nArticle about LLRAs in eRm:\n"),
  entry   = "ARTICLE",
  title   = "{IRT models with relaxed assumptions in eRm: A manual-like instruction}",
  author  = c(RH, TR),
  year    = 2009,
  page    = "87--120",
  journal = "{Psychology Science Quarterly}",
  volume  = 51,
  issue   = 1,
  textVersion = paste0(
    "Hatzinger, R., & Rusch, T. (2009). ",
    "IRT models with relaxed assumptions in eRm: A manual-like instruction. ",
    "Psychology Science Quarterly, 51(1), 87-120."
  )
)

# LLRA Springer 2013
citEntry(
  header  = paste0("\n", paste0(rep("#", getOption("width")-1L), collapse=""), "\nBook Chapter about LLRAs:\n"),
  entry   = "INPROCEEDINGS",
  title   = "{Linear logistic models with relaxed assumptions in R}",
  author  = c(TR, MJM, RH),
  booktitle = "{Algorithms from and for Nature and Life}",
  editor  = c(person("Berthold", "Lausen"), person("Dirk", "van den Poel"), person("Alfred", "Ultsch")),
  series  = "{Studies in Classification, Data Analysis, and Knowledge Organization}",
  year    = 2013,
  page    = "337--347",
  address = "{New York}",
  publisher = "{Springer}",
  doi     = "10.1007/978-3-319-00035-0_34",
  textVersion = paste0(
    "Rusch T., Maier M. J., & Hatzinger R. (2013). ",
    "Linear logistic models with relaxed assumptions in R. ",
    "In: B. Lausen, D. van den Poel, & A. Ultsch (Eds.) ",
    "Algorithms from and for Nature and Life.",
    "New York: Springer. 337-347. ",
    "http://dx.doi.org/10.1007/978-3-319-00035-0_34"
  )
)


# NPar Tests 2015
citEntry(
  header  = paste0("\n", paste0(rep("#", getOption("width")-1L), collapse=""), "\nArticle about the performance of Quasi-Exact Tests in eRm:\n"),
  entry   = "ARTICLE",
  title   = "{An Empirical Power Analysis of Quasi-Exact Tests for the Rasch Model: Measurement Invariance in Small Samples}",
  author  = c(IK, MJM, RH),
  year    = 2015,
  volume  = 11,
  issue   = 2,
  page    = "45--54",
  journal = "{Methodology}",
  doi     = "10.1027/1614-2241/a000090",
  textVersion = paste0(
    "Koller, I., Maier, M. J., & Hatzinger, R. (2015). ",
    "An Empirical Power Analysis of Quasi-Exact Tests for the Rasch Model: Measurement Invariance in Small Samples. ",
    "Methodology, 11(2), 45-54. ",
    "http://dx.doi.org/10.1027/1614-2241/a000090"
  )
)
