codebook.md 1.7 KB

Traces

Defaults

By default the traces were generated using the following parameters, these correspond to the arguments in the model creation function (found in the github repo scripts/run_on_cluster/run_model_gender.py).

beta = False
offset_data=0
prior_delay=-1
width_delay_prior=0.1
sigma_incubation=-1.0
median_width_delay=1.0
interval_cps=10.0
f_fem=0.2
uc=True
len=normal        

Trace spectific parameters

Some traces may correspond to models run on another initial parameter set, these parameters are encoded in the filename of the trace.

Explaination of parameters

  • beta Use the beta compartment of our model (see publication for more details)
  • country The country for which the model was run.
  • offset_data The offset of the data in days, i.e. shifting of the case data. The priors of the date of games are not affected by this!
  • prior_delay Mean for the prior for the delay in days.
  • width_delay_prior Width of the prior for the delay in days.
  • sigma_incubation Prior width of the mean latent period
  • interval_cps Number of days between proposed change points
  • f_fem Prior for the gender imbalance of soccer fan participation.
  • len Duration of the model, i.e. how much data is considered.
  • uc If change points are allowed during the uefa championship

Loading the traces

We always save the traces as pickle objects! If you want to use them you should strictly use the same package versions as we did for our analyses, otherwise you may not be able to load the trace and model combos.

import pickle

def load(fstr):
    with open(fstr, "rb") as f:
         return pickle.load(f)

model, trace = load("desired_file.pkl")