Learn R Programming

scregclust (version 0.2.0)

coef_ols: 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)

Value

Vector of OLS coefficients

Arguments

y

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

x

Design matrix (n x p)