Zero-inflated Bell model

library(bellreg)

data(cells)

# ML approach:
mle <- zibellreg(cells ~ smoker+gender|smoker+gender, data = cells, approach = "mle")
summary(mle)
#> Call:
#> zibellreg(formula = cells ~ smoker + gender | smoker + gender, 
#>     data = cells, approach = "mle")
#> 
#> Zero-inflated regression coefficients:
#>             Estimate   StdErr z.value  p.value   
#> (Intercept) -1.95194  0.84468 -2.3109 0.020840 * 
#> smoker       2.17615  0.82290  2.6445 0.008182 **
#> gender      -0.49590  0.42061 -1.1790 0.238390   
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> 
#> Count regression coefficients:
#>              Estimate    StdErr z.value   p.value    
#> (Intercept)  0.716552  0.179846  3.9843 6.769e-05 ***
#> smoker      -0.611706  0.183400 -3.3354 0.0008519 ***
#> gender       0.036264  0.177481  0.2043 0.8380972    
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> --- 
#> logLik = -610.3234   AIC = 1232.647

# Bayesian approach:
bayes <- zibellreg(cells ~ 1|smoker+gender, data = cells, approach = "bayes", refresh = FALSE)
summary(bayes)
#> Call:
#> zibellreg(formula = cells ~ 1 | smoker + gender, data = cells, 
#>     approach = "bayes", refresh = FALSE)
#> 
#> Prior specifications: 
#> intercept ~ normal(0, 10)
#> psi ~ normal(mu = 0, sigma = 2.5)
#> beta ~ normal(0, 2.5)
#> 
#> Zero-inflated regression coefficients:
#>      mean        sd      2.5%       50%     97.5%     n_eff      Rhat 
#>   -1.1520    0.3221   -1.8750   -1.1159   -0.6296 1816.8968    1.0014 
#> 
#> Count regression coefficients:
#>                mean     sd    2.5%     50%   97.5%    n_eff   Rhat
#> (Intercept)  0.7181 0.1458  0.4299  0.7175  1.0038 3086.932 1.0002
#> smoker      -1.0741 0.1478 -1.3673 -1.0720 -0.7861 2296.083 1.0002
#> gender       0.1745 0.1418 -0.1062  0.1738  0.4459 2821.676 0.9998
#> --- 
#> Inference for Stan model: zibellreg.
#> 4 chains, each with iter=2000; warmup=1000; thin=1; 
#> post-warmup draws per chain=1000, total post-warmup draws=4000.