Compute and return the root-mean-square error for each model. This method is only intended for testing.
The root-mean-square error (RMSE) is $$\frac{1}{K}\sum_{i = 1}^K \sqrt{\frac{1}{N}\sum_{j=1}^N Y_{ji}-(X\hat \beta)_{ji}}$$ RMSE is the default error.
# S3 method for sgl
Err(object, data = NULL, response = object$Y.true, ...)
a lsgl object.
a design matrix (the \(X\) matrix).
a matrix of the true responses (the \(Y\) matrix).
ignored.
a vector of errors.