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.1591    0.3271   -1.9013   -1.1306   -0.6322 1790.8479    1.0010 
#> 
#> Count regression coefficients:
#>                mean     sd    2.5%     50%   97.5%    n_eff   Rhat
#> (Intercept)  0.7168 0.1466  0.4303  0.7162  0.9998 2994.565 1.0003
#> smoker      -1.0730 0.1501 -1.3582 -1.0774 -0.7688 2466.148 1.0005
#> gender       0.1705 0.1425 -0.1022  0.1718  0.4443 2905.608 1.0007
#> --- 
#> 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.