Supplemental file 1: Details on the model’s algorithm