Learn R Programming

FARS (version 0.7.1)

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

Value

A numeric matrix of coefficients.

Arguments

X

A numeric matrix of regressors (T × k).

Y

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