Computes score residuals based on the numerical derivative (score) of the log-likelihood with respect to the observation.
calculateScoreResiduals(y, fitted, params, family = "gkw")
NumericVector of score residuals.
NumericVector of observations.
NumericVector of fitted values (means).
NumericMatrix with parameters (columns: alpha, beta, gamma, delta, lambda).
String specifying the distribution family (default: "gkw").