Modelling gender differences in participation in PhD studies in mathematics