Learn R Programming

svytest (version 1.1.0)

.wls_fit: Internal helper: Weighted least squares fit

Description

Performs a weighted least squares regression using QR decomposition, with a generalized inverse fallback if the system is singular.

Usage

.wls_fit(X, y, w)

Value

A list with elements beta, mu, resid,

sigma2, and XtX.

Arguments

X

Numeric design matrix.

y

Numeric response vector.

w

Numeric vector of weights.