beta_ols: Efficient OLS Estimation

View source: R/beta_ols.R

beta_olsR Documentation

Efficient OLS Estimation

Description

Computes OLS coefficients using .lm.fit for computational efficiency. If Y is a matrix, applies OLS column-wise.

Usage

beta_ols(X, Y)

Arguments

X

A numeric matrix of regressors (T × k).

Y

A numeric matrix or vector of responses (T × N or T × 1).

Value

A numeric matrix of coefficients.


FARS documentation built on Feb. 17, 2026, 5:06 p.m.