## R >= 2.8.0 passes package metadata to citation().
if(!exists("meta") || is.null(meta)) meta <- packageDescription("factorstochvol")
year <- sub("-.*", "", meta$Packaged)
note <- sprintf("R package version %s", meta$Version)

bibentry(bibtype = "Article",
  title        = "Modeling Univariate and Multivariate Stochastic Volatility in {R} with {stochvol} and {factorstochvol}",
  author       = c(
                   person(given = "Darjus",
                          family = "Hosszejni",
                          email = "darjus.hosszejni@wu.ac.at"),
                   person(given = "Gregor",
                          family = "Kastner",
                          email = "gregor.kastner@aau.at")),
  journal      = "Journal of Statistical Software",
  year         = "2021",
  volume       = "100",
  number       = "12",
  pages        = "1--34",
  doi          = "10.18637/jss.v100.i12",
  header       = "To cite factorstochvol in publications use:",
  textVersion  =
  paste("Hosszejni, Darjus and Gregor Kastner (2021).",
        "Modeling Univariate and Multivariate Stochastic Volatility in R with stochvol and factorstochvol.",
        "Journal of Statistical Software, 100(12), 1-34.",
        "URL: https://doi.org/10.18637/jss.v100.i12")
)

bibentry(header = "To refer to the interweaving (ASIS) methodology used in factorstochvol please cite:",
         bibtype = "Article",
         title = "Efficient {B}ayesian Inference for Multivariate Factor Stochastic Volatility Models",
         author = c(as.person("Gregor Kastner"),
                             as.person("Sylvia Fr\\\"{u}hwirth-Schnatter"),
                             as.person("Hedibert Freitas Lopes")),
         journal = "Journal of Computational and Graphical Statistics",
         year = "2017",
         volume = "26",
         number = "4",
         pages = "905--917",
         doi = "10.1080/10618600.2017.1322091",
         textVersion = "Kastner, Gregor, Sylvia Frühwirth-Schnatter and Hedibert Freitas Lopes (2017). Efficient Bayesian Inference for Multivariate Factor Stochastic Volatility Models. Journal of Computational and Graphical Statistics, 26(4), 905-917. URL: https://doi.org/10.1080/10618600.2017.1322091"
)

bibentry(header = "To refer to the shrinkage methodology used in factorstochvol (NG priors) please cite:",
         bibtype = "Article",
         title = "Sparse {B}ayesian Time-Varying Covariance Estimation in Many Dimensions",
         author = c(as.person("Gregor Kastner")),
         journal = "Journal of Econometrics",
         year = "2019",
	 volume = "210",
	 number = "1",
	 pages = "98--115",
         doi = "10.1016/j.jeconom.2018.11.007",
         textVersion = "Kastner, Gregor (2019). Sparse Bayesian Time-Varying Covariance Estimation in Many Dimensions. Journal of Econometrics, 210(1), 98-115. URL: https://doi.org/10.1016/j.jeconom.2018.11.007"
)

citFooter("BibTeX entries of the above can be obtained by", sQuote('toBibtex(citation("factorstochvol"))'))
