OLS.fit()

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, optional

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

cov_type : str, optional

See regression.linear_model.RegressionResults for a description of the available covariance estimators登录查看完整内容