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

citHeader("To cite package", sQuote(meta$Package), "in publications use:")

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

bibentry(
  bibtype = "Manual",
  title ="nlmm: {G}eneralized {L}aplace {M}ixed-{E}ffects {M}odels",
  author = person(given = "Marco", family = "Geraci"),
  year = year,
  note = vers,
  url = "https://cran.r-project.org/package=nlmm",
  textVersion  = paste0("Geraci M (",
                     year,
                     "). nlmm: Generalized Laplace Mixed-Effects Models. ",
                     vers, ". Available at https://cran.r-project.org/package=nlmm", ".")
	)

bibentry(
	bibtype = "Article",
 	author = c(person(given = "Marco", family = "Geraci"), person(given = "Alessio", family = "Farcomeni")),
	title = "A family of linear mixed-effects models using the generalized {L}aplace distribution",
 	journal = "Statistical Methods in Medical Research",
	volume = "29",
	number = "9",
	pages = "2665--2682",
	year = "2020",
	textVersion = paste("Geraci M and Farcomeni A (2020).",
	"A family of linear mixed-effects models using the generalized Laplace distribution.",
	"Statistical Methods in Medical Research 29(9), 2665-2682.")
)
citFooter("A BibTeX entry for LaTeX users is toBibtex(citation('nlmm'))")
