Varying-coefficient model for the occurrence rate function of recurrent events