Logo

statsmodels.regression.linear_model.OLS.fit

OLS.fit(method='pinv', cov_type='nonrobust', cov_kwds=None, use_t=None, **kwargs)

Full fit of the model.

The results include an estimate of covariance matrix, (whitened) residuals and an estimate of scale.

Parameters:

method : str

Can be “pinv”, “qr”. “pinv” uses the Moore-Penrose pseudoinverse to solve the least squares problem. “qr” uses the QR factorization.

Returns:

A RegressionResults class instance. :

See also

regression.RegressionResults

Notes

The fit method uses the pseudoinverse of the design/exogenous variables to solve the least squares minimization.

Previous topic

statsmodels.regression.linear_model.OLS

Next topic

statsmodels.regression.linear_model.OLS.fit_regularized

This Page