pyhctsa.operations.model_fit.ar_cov¶
-
pyhctsa.operations.model_fit.ar_cov(y, p=
2)¶ Fits an autoregressive (AR) model of a given order p.
Uses the arcov approach (covariance method) to fit an AR model to the input time series.
- Parameters:¶
- Returns:¶
Dictionary containing the variance estimate of the white noise input to the AR model (
noisevar), the parameters of the fitted model (a1, …,a{p+1}, witha1 = 1), and the 11'core'statistics of the residuals of the reconstructed time series (seeresidual_analysis()). The residuals are prediction minus data.The residuals are the one-step prediction errors (prediction minus data) over the
N - psamples that haveppast values.NaN for a (nearly) exactly predictable series: when the fitted noise variance is below 1e-12 of the variance of the series, the design is singular and the fitted coefficients and residuals are not meaningful (e.g., an exact sinusoid with p > 2).
- Return type:¶
dict