I have a dataset that looks like the one below (first 5 rows shown). CPA is an observed result from an experiment (treatment) on different advertising flights. Flights are hierarchically grouped in campaigns.
campaign_uid flight_uid treatment CPA
0 0C2o4hHDSN 0FBU5oULvg control -50.757370
1 0C2o4hHDSN 0FhOqhtsl9 control 10.963426
2 0C2o4hHDSN 0FwPGelRRX exposed -72.868952
3 0C5F8ZNKxc 0F0bYuxlmR control 13.356081
4 0C5F8ZNKxc 0F2ESwZY22 control 141.030900
5 0C5F8ZNKxc 0F5rfAOVuO exposed 11.200450
I fit a model like the following one:
model.fit('CPA ~ treatment', random=['1|campaign_uid'])
To my knowledge, this model simply says:
- We have a slope for treatment
- We have a global intercept
- We also have an intercept per campaign
so one would just get one posterior for each such variable.
However, looking at the results below, I also get posteriors for the following variable: 1|campaign_uid_offset
. What does it represent?
Code for fitting the model and the plot:
model = Model(df)
results = model.fit('{} ~ treatment'.format(metric),
random=['1|campaign_uid'],
samples=1000)
# Plotting the result
pm.traceplot(model.backend.trace)