statsmodels.tsa.ar_model.AutoReg.fit

AutoReg.fit(cov_type='nonrobust', cov_kwds=None, use_t=False)[source]

Estimate the model parameters.

Parameters:
cov_typestr

The covariance estimator to use. The most common choices are listed below. Supports all covariance estimators that are available in OLS.fit.

  • ‘nonrobust’ - The class OLS covariance estimator that assumes homoskedasticity.

  • ‘HC0’, ‘HC1’, ‘HC2’, ‘HC3’ - Variants of White’s (or Eiker-Huber-White) covariance estimator. HC0 is the standard implementation. The other make corrections to improve the finite sample performance of the heteroskedasticity robust covariance estimator.

  • ‘HAC’ - Heteroskedasticity-autocorrelation robust covariance estimation. Supports cov_kwds.

    • maxlags integer (required) : number of lags to use.

    • kernel callable or str (optional)kernel

      currently available kernels are [‘bartlett’, ‘uniform’], default is Bartlett.

    • use_correction bool (optional)If true, use small sample

      correction.

cov_kwdsdict, optional

A dictionary of keyword arguments to pass to the covariance estimator. nonrobust and HC# do not support cov_kwds.

use_tbool, optional

A flag indicating that inference should use the Student’s t distribution that accounts for model degree of freedom. If False, uses the normal distribution. If None, defers the choice to the cov_type. It also removes degree of freedom corrections from the covariance estimator when cov_type is ‘nonrobust’.

Returns:
AutoRegResults

Estimation results.

See also

statsmodels.regression.linear_model.OLS

Ordinary Least Squares estimation.

statsmodels.regression.linear_model.RegressionResults

See get_robustcov_results for a detailed list of available covariance estimators and options.

Notes

Use OLS to estimate model parameters and to estimate parameter covariance.


Last update: Dec 23, 2024