bayesplain.core.dirichlet_multinomial.log_odds_ratio

bayesplain.core.dirichlet_multinomial.log_odds_ratio(prob_tables)[source]

Log odds ratio of a 2x2 table of probabilities, or a stack of them.

Independence corresponds to a log odds ratio of zero, which makes this the natural effect size when the table is 2x2 and the reason Jamil et al. report posteriors on this scale.

Parameters:
prob_tables : array_like

A single (2, 2) table of probabilities, or a stack of shape (size, 2, 2).

Returns:

log((p00 * p11) / (p01 * p10)), scalar-shaped for a single table.

Return type:

ndarray