Gravar-mail: An Estimating Function Approach to the Analysis of Recurrent and Terminal Events