From a8bb5d87f36bcc3f3955f0e939d3722e573005da Mon Sep 17 00:00:00 2001 From: edknock Date: Tue, 29 Oct 2024 14:17:02 +0000 Subject: [PATCH] fix beta-binomial --- inst/include/monty/random/density.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/include/monty/random/density.hpp b/inst/include/monty/random/density.hpp index 67f272c1..5c341918 100644 --- a/inst/include/monty/random/density.hpp +++ b/inst/include/monty/random/density.hpp @@ -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