To cite package 'margins' in publications use:

Thomas J. Leeper (2024). margins: Marginal Effects for Model Objects. R package version 0.3.28.

Corresponding BibTeX entry:

  @Manual{,
    title = {margins: Marginal Effects for Model Objects},
    author = {{Thomas J. Leeper}},
    year = {2024},
    note = {R package version 0.3.28},
  }