## 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       = personList(
                   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         = "forthcoming",
  url          = "https://arxiv.org/abs/1906.12123",

  header       = "To cite factorstochvol in publications use:",
  textVersion  =
  paste("Hosszejni, Darjus and Gregor Kastner (forthcoming).",
        "Modeling Univariate and Multivariate Stochastic Volatility in R with stochvol and factorstochvol.",
        "Journal of Statistical Software.",
        "https://arxiv.org/abs/1906.12123")
)

citEntry(header = "To refer to the interweaving (ASIS) methodology used in factorstochvol please cite:",
         entry = "article",
         title = "Efficient {B}ayesian Inference for Multivariate Factor Stochastic Volatility Models",
         author = personList(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"
)

citEntry(header = "To refer to the shrinkage methodology used in factorstochvol (NG priors) please cite:",
         entry = "article",
         title = "Sparse {B}ayesian Time-Varying Covariance Estimation in Many Dimensions",
         author = personList(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"))'))
