dot-weighted_qr_solve: QR-based weighted least squares with cell-derived row weights

.weighted_qr_solveR Documentation

QR-based weighted least squares with cell-derived row weights

Description

Solves \min_\beta \sum_i w_i (y_i - X_i \beta)^2 on the unweighted design, where the row weight w_i = w^{cellrow}_i \cdot w^{\psi}_i \cdot w^{resp}_i and w^{cellrow}_i is the geometric mean of the predictor cell weights of row i. Cell weights thus downweight the influence of rows with contaminated cells without distorting the design values, so the returned \beta is a valid coefficient for X \beta. Uses QR decomposition for numerical stability.

Usage

.weighted_qr_solve(X_int, y, w_cell_int, w_response, w_psi)

Arguments

X_int

n \times (p+1) design matrix with intercept

y

numeric n-vector

w_cell_int

n \times (p+1) cell weight matrix

w_response

numeric n-vector of response weights

w_psi

numeric n-vector of psi-weights from residuals

Value

numeric (p+1)-vector of regression coefficients

Author(s)

Matthias Templ


VIM documentation built on Sept. 2, 2026, 5:07 p.m.