pyhctsa.operations.model_fit.ar_fit

pyhctsa.operations.model_fit.ar_fit(y, p_min=1, p_max=10, selector='sbc')

Statistics of a fitted AR model to a time series.

Fits autoregressive (AR) models of orders p = p_min, p_min + 1, …, to the input time series, selects the optimal model order using Schwartz’s Bayesian Criterion (SBC), and returns statistics on the fitted model, residuals, and confidence intervals.

References

Parameters:
y : array-like

The input time series.

p_min : int, optional

The minimum AR model order to fit. Default is 1.

p_max : int, optional

The maximum AR model order to fit. Default is 10.

selector : str, optional

Criterion to select optimal model order (e.g., ‘sbc’, cf. ARFIT package documentation). Default is ‘sbc’.

Returns:

Dictionary containing statistics of a fitted AR model to a time series.

Return type:

dict