Package index
Joint bivariate-count families
Model the pair of counts jointly via trivariate reduction, capturing its correlation, marginal overdispersion, and difference together rather than the difference alone. Each component distribution has one family name and two constructors: the plain constructor for a fully paired design, and the _partialobs constructor for a design in which the first count is missing on some rows. The two constructors of a family share a likelihood and a set of post-processing methods.
-
bipois()bipois_stanvars()log_lik_bipois()posterior_predict_bipois()posterior_epred_bipois() - Joint bivariate-Poisson custom family for brms
-
binegbin()binegbin_stanvars()log_lik_binegbin()posterior_predict_binegbin()posterior_epred_binegbin() - Joint bivariate custom family with negative-binomial components for brms
Partially observed pairs
The same two models, for rows on which the first count was never recorded. Those rows are scored by the integrated-out marginal of the same joint, so they still inform the shared component and the second source rather than being dropped. For Poisson components that marginal is closed form; for Negative-Binomial components it is a convolution. This is unrelated to the brms cens() addition term, which means a value known to lie in a set.
-
bipois_partialobs()bipois_partialobs_stanvars() - Joint bivariate-Poisson family for partially observed pairs
-
binegbin_partialobs()binegbin_partialobs_stanvars() - Joint bivariate family with negative-binomial components for partially observed pairs
Parameterisation helpers
Convert between the dpars a family takes and the interpretable coordinates: the midpoint of the two expected counts, congruence, and source bias.
-
binegbin_mfd_to_dpars() - Convert (M, f, delta) coordinates to native binegbin/bipois dpars
-
binegbin_dpars_to_mfd() - Convert native binegbin/bipois dpars to (M, f, delta) coordinates
Example data
A simulated partially paired dataset with known generating values, and its latent components.
-
bicount_sim - Simulated partially paired counts from three sites
-
bicount_sim_latent - Latent components of the simulated partially paired counts