coef_ols: Compute OLS coefficients

View source: R/utils.R

coef_olsR Documentation

Compute OLS coefficients

Description

If the design matrix has full column-rank, then use the normal least squares estimate. Otherwise, use the Moore-Penrose inverse to compute the least squares estimate.

Usage

coef_ols(y, x)

Arguments

y

Target vector (n x 1)/matrix (n x m)

x

Design matrix (n x p)

Value

Vector of OLS coefficients


scregclust documentation built on April 4, 2025, 3:03 a.m.