Learn R Programming

AutoSEARCH (version 1.5)

ols.fit1: Fast and accurate OLS estimation by means of QR decomposition

Description

ols.fit1 and ols.fit2 are auxiliary functions called by sm, gets.mean and gets.vol. The ols.fit2 function returns slightly more information than ols.fit1, which makes the latter faster. However, variance-covariance are to be needed in a second step, then ols.fit2 is faster due to the additional information provided by it.

Usage

ols.fit1(y, x, tol=1e-07, LAPACK=FALSE) ols.fit2(y, x, tol=1e-07, LAPACK=FALSE)

Arguments

y
numeric vector, the regressand
x
numeric matrix, the regressors
tol
numeric value (default = 1e-07). The tolerance for detecting linear dependencies in the columns of the regressors (see qr() function). Only used if LAPACK is FALSE
LAPACK
logical, TRUE or FALSE (default). If true use LAPACK otherwise use LINPACK (see qr() function)

Value

A list that contains some or all of the following elements:
qr
rank
qraux
pivot
xtxinv
xtx
xty
coefficients

See Also

qr, solve