Computes partial residuals for a selected covariate by adding the product of the regression coefficient and the corresponding design matrix value to the raw residual.
calculatePartialResiduals(y, fitted, X, beta, covariate_idx)
NumericVector of partial residuals.
NumericVector of observations.
NumericVector of fitted values.
NumericMatrix of design matrix values.
NumericVector of regression coefficients.
Integer index for the selected covariate (0-indexed).