To cite the 'madness' package in publications use:

Pav SE (2020). madness: Automatic Differentiation of Multivariate Operations. R package version 0.2.7, https://github.com/shabbychef/madness.

Corresponding BibTeX entry:

  @Manual{madness-Manual,
    title = {{madness}: Automatic Differentiation of Multivariate
      Operations},
    author = {Steven E. Pav},
    year = {2020},
    note = {R package version 0.2.7},
    url = {https://github.com/shabbychef/madness},
  }