Skip to content

Commit

Permalink
Polya -> Pólya
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Jul 18, 2023
1 parent 97750c5 commit 80973e2
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^cran-comments\.md$
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: pg
Title: Polya-Gamma Distribution Sampler
Title: Pólya-Gamma Distribution Sampler
Version: 0.2.4
Authors@R:
c(
Expand All @@ -11,7 +11,7 @@ Authors@R:
)
)
Description: Provides access to a high performant random distribution
sampler for the Polya-Gamma Distribution using either 'C++' headers for
sampler for the Pólya-Gamma Distribution using either 'C++' headers for
'Rcpp' or 'RcppArmadillo' and 'R'.
URL: https://tmsalab.github.io/pg/, https://github.com/tmsalab/pg
BugReports: https://github.com/tmsalab/pg/issues
Expand Down
4 changes: 2 additions & 2 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Sample from the Polya-Gamma distribution PG(h, z)
#' Sample from the Pólya-Gamma distribution PG(h, z)
#'
#' Chooses the most efficient implemented method to sample from a Polya-Gamma
#' Chooses the most efficient implemented method to sample from a Pólya-Gamma
#' distribution. Details on algorithm selection presented below.
#'
#' @param n The number of samples to taken from a PG(h, z). Used only by
Expand Down
14 changes: 7 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ knitr::opts_chunk$set(
[![Package-License](http://img.shields.io/badge/license-GPL%20(%3E=3)-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-3.0.html)
<!-- badges: end -->

The goal of pg is to provide both _R_ and _C++_ header access to the Polya-Gamma
The goal of pg is to provide both _R_ and _C++_ header access to the Pólya-Gamma
distribution sampling routine.

## Installation
Expand All @@ -35,7 +35,7 @@ devtools::install_github("tmsalab/pg")

## Usage

Let `X` be a Polya-Gamma Distribution denoted by `PG(h, z)`, where `h` is the
Let `X` be a Pólya-Gamma Distribution denoted by `PG(h, z)`, where `h` is the
"shape" parameter and `z` is the "scale" parameter. Presently, the following
sampling cases are enabled:

Expand Down Expand Up @@ -118,16 +118,16 @@ pg::rpg_vector(n, h, z)

## See also

The following are useful resources regarding the Polya-Gamma distribution.
The following are useful resources regarding the Pólya-Gamma distribution.

- Papers
- "Bayesian Inference for Logistic Models Using Pólya–Gamma Latent Variables"
by Nicholas G. Polson, James G. Scott, and Jesse Windle (2013)
[doi:10.1080/01621459.2013.829001](https://doi.org/10.1080/01621459.2013.829001). Paper that invented the Polya-Gamma
- "Sampling Polya-Gamma random variates: alternate and approximate techniques"
[doi:10.1080/01621459.2013.829001](https://doi.org/10.1080/01621459.2013.829001). Paper that invented the Pólya-Gamma
- "Sampling Pólya-Gamma random variates: alternate and approximate techniques"
by Jesse Windle, Nicholas G. Polson, and James G. Scott (2014)
<https://arxiv.org/abs/1405.0506>. Provides an efficiency overview of the
different sampling approaches to sampling from a Polya-Gamma distribution.
different sampling approaches to sampling from a Pólya-Gamma distribution.
- R Implementations:
- [`BayesLogit`](https://cran.r-project.org/package=BayesLogit) _R_ package by
Nicholas G. Polson, James G. Scott, and Jesse Windle. Provides the
Expand All @@ -142,7 +142,7 @@ The following are useful resources regarding the Polya-Gamma distribution.
- Support in other languages:
- `Python` has the [`pypolyagamma`](https://github.com/slinderman/pypolyagamma)
package by Scott Linderman.
- `Stan` [lacks an implementation](https://discourse.mc-stan.org/t/sampling-from-a-polya-gamma-distribution/8067) for the Polya-Gamma distribution since it relies on joint proposals
- `Stan` [lacks an implementation](https://discourse.mc-stan.org/t/sampling-from-a-polya-gamma-distribution/8067) for the Pólya-Gamma distribution since it relies on joint proposals
rather than full conditionals.

## Author
Expand Down
4 changes: 2 additions & 2 deletions man/pg-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/rpg-sampler.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/rpg.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "pg.h"

//' Sample from the Polya-Gamma distribution PG(h, z)
//' Sample from the Pólya-Gamma distribution PG(h, z)
//'
//' Chooses the most efficient implemented method to sample from a Polya-Gamma
//' Chooses the most efficient implemented method to sample from a Pólya-Gamma
//' distribution. Details on algorithm selection presented below.
//'
//' @param n The number of samples to taken from a PG(h, z). Used only by
Expand Down

0 comments on commit 80973e2

Please sign in to comment.