Closed amarshankarc closed 3 months ago
library(BAS)
beta_poisson_pmf1 <- function(x, alpha, beta) { numerator <- gamma(x + alpha) gamma(alpha + beta) hypergeometric1F1(x + alpha, x + alpha + beta, -1) denominator <- gamma(x + 1) gamma(alpha) gamma(x + alpha + beta) result <- numerator / denominator return(result) } beta_poisson_pmf1(1,2,3) probability mass function is negative is getting
Duplicate of #78
Please read the documentation and use the flag log=FALSE as shown in reply to issue #78
library(BAS)
beta_poisson_pmf1 <- function(x, alpha, beta) { numerator <- gamma(x + alpha) gamma(alpha + beta) hypergeometric1F1(x + alpha, x + alpha + beta, -1) denominator <- gamma(x + 1) gamma(alpha) gamma(x + alpha + beta) result <- numerator / denominator return(result) } beta_poisson_pmf1(1,2,3) probability mass function is negative is getting