Calculates residuals from observed outcome and predicted values (Gaussian family) or predicted probabilities (binomial family). Called by `.exp.multiple` and `.iso.multiple`.
Arguments
- y
response: vector of length \(n\) (see family)
- y_hat
predicted values or probabilities (see family): vector of length \(n\), or matrix with \(n\) rows (samples) and \(k\) columns (methods)
- family
character "gaussian" (\(y\): real numbers, \(y\_hat\): real numbers) or "binomial" (\(y\): 0s and 1s, \(y\_hat\): unit interval)