Skip to content

Commit

Permalink
Merge pull request #92 from mrc-ide/fix-beta-binomial
Browse files Browse the repository at this point in the history
Fix beta binomial
  • Loading branch information
richfitz authored Oct 30, 2024
2 parents d41c2a9 + fb9662b commit c508953
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: monty
Title: Monte Carlo Models
Version: 0.2.24
Version: 0.2.25
Authors@R: c(person("Rich", "FitzJohn", role = c("aut", "cre"),
email = "[email protected]"),
person("Wes", "Hinsley", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion inst/include/monty/random/density.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ __host__ __device__ T beta_binomial_prob(int x, int size, T prob, T rho,
bool log) {
const T a = prob * (1 / rho - 1);
const T b = (1 - prob) * (1 / rho - 1);
return beta_binomial_ab(size, a, b, log);
return beta_binomial_ab(x, size, a, b, log);
}

template <typename T>
Expand Down

0 comments on commit c508953

Please sign in to comment.