Function used to calculate the first derivatives of the log likelihood with respect to the model parameters.
Useful links