-
a[0]is the parameter associated with the first actor.a_baris a separate parameter that is used to specify the prior on the mean ofa[0](anda[1], etc.). Parameters likea_bar(andsigma_a, etc.) are sometimes referred to as hyperparameters. So the influence ofa_barona[0]is already taken care of during model specification and the posterior samples you see ofa[0]can be interpreted without addinga_baror anything like that. -
Creating a
pm.Deterministicsaving the values into the trace. If you don’t want to save them, then you just do:
pulled_left = pm.Binomial("pulled_left",
1,
pm.math.invlogit(a[actor_] +
g[block_] +
b[treatment_]
),
observed=d.pulled_left.values
)