Ordinary least squares.Source:
Simple implementation of ordinary least squares that computes with sparse feature matrices.
The outcome variable.
The feature matrix.
Boolean equal to
TRUEif a constant should be included. The default is
A vector of weights for weighted least squares.
ols returns an object of S3 class
ols. An object of class
ols is a list containing
the following components:
A vector with the regression coefficents.
Pass-through of the user-provided arguments. See above.