Closed canyon289 closed 1 year ago
PyMC gets the right values
with pm.Model() as model:
p = pm.Beta("p", 2, 2, shape=2)
obs = pm.Bernoulli("obs", p=p[idx.codes], observed = df["samples"])
idata = pm.sample()
This is because you're visualizing the regression coefficients, while what you want are the success probabilities. You need the inverse link function:
from scipy.special import expit
az.plot_posterior(expit(ab_test.posterior))
and you get the plot you want
:facepalm:
Bambi seems to be returning values that are incorrect from a simplistic dataset and model. Are folks seeing the same issue that I am?