Learn R Programming

gets (version 0.2)

ols: OLS estimation with the QR decomposition

Description

Accurate, robust and fast OLS estimation with the QR decomposition

Usage

ols(y, x, tol=1e-07, LAPACK=FALSE, method=1)

Arguments

y
numeric vector, the regressand
x
numeric matrix, the regressors
tol
numeric value. 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
method
1 (default) or 2. Method 2 returns slightly more information, which means it is slightly slower. However, the information returned can be used to speed up the computation of variance-covariance matrices

Value

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

See Also

qr, solve.qr