Skip to contents

beta_binomial() defines a one-response denominator-aware distribution for successes out of known trials. Use it with two-column count responses such as bf(cbind(successes, failures) ~ x, sigma ~ z), where trials_i = successes_i + failures_i.

Usage

beta_binomial()

Value

A drm_family object.

Details

The implemented contract is logit(mu) = eta_mu, log(sigma) = eta_sigma, and internal beta precision phi = 1 / sigma^2. Conditional on a latent success probability p_i ~ Beta(mu_i * phi_i, (1 - mu_i) * phi_i), the observed successes follow Binomial(trials_i, p_i). Larger sigma means more extra-binomial variation around the mean probability.

The first implementation supports fixed effects only. Random effects, meta_known_V(V = V), phylogenetic or spatial terms, bivariate beta-binomial models, and a successes/trials response alias are planned but not implemented.

Examples

beta_binomial()
#> $name
#> [1] "beta_binomial"
#> 
#> $family
#> [1] "beta_binomial"
#> 
#> $n_response
#> [1] 1
#> 
#> $dpars
#> [1] "mu"    "sigma"
#> 
#> $links
#>      mu   sigma 
#> "logit"   "log" 
#> 
#> attr(,"class")
#> [1] "drm_family"