statsmodels.regression.linear_model.WLS.fit

WLS.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
  • cov_kwds (list or None, optional) – See linear_model.RegressionResults.get_robustcov_results for a description required keywords for alternative covariance estimators
  • use_t (bool, optional) – Flag indicating to use the Student’s t distribution when computing p-values. Default behavior depends on cov_type. See linear_model.RegressionResults.get_robustcov_results for implementation details.
Returns:
Return type:

A RegressionResults class instance.

See also

regression.linear_model.RegressionResults, regression.linear_model.RegressionResults.get_robustcov_results

Notes

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

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.regression.linear_model.WLS.fit.html