Learn R Programming

gkwreg (version 1.0.7)

calculatePartialResiduals: Calculate Partial Residuals

Description

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.

Usage

calculatePartialResiduals(y, fitted, X, beta, covariate_idx)

Value

NumericVector of partial residuals.

Arguments

y

NumericVector of observations.

fitted

NumericVector of fitted values.

X

NumericMatrix of design matrix values.

beta

NumericVector of regression coefficients.

covariate_idx

Integer index for the selected covariate (0-indexed).