This function computes the residuals for objects created by
fit.NNMoMo.
It is analog to the residuals.fitStMoMo function for
StMoMo but without the option to scale the residuals as nobs and
npar are not provided by the neural network.
# S3 method for fitNNMoMo
residuals(object, scale = FALSE, ...)An object of class resStMoMo with the residuals. This object
has components:
residuals: a matrix with the residuals.
ages: ages corresponding to the rows in residuals.
years: years corresponding to the columns in residuals.
An object of class fitNNMoMo with the fitted parameters
of a stochastic mortality model.
Logical, default FALSE. If TRUE, an error is
thrown because the number of observations (nobs) and parameters
(npar) cannot be calculated for fitNNMoMo objects.
Further arguments passed to or from other methods.