pysteps.timeseries.autoregression.iterate_ar_model

pysteps.timeseries.autoregression.iterate_ar_model

pysteps.timeseries.autoregression.iterate_ar_model(x, phi, eps=None)

Apply an AR(p) model

\(x_{k+1}=\phi_1 x_k+\phi_2 x_{k-1}+\dots+\phi_p x_{k-p}+\phi_{p+1}\epsilon\)

to a time series \(x_k\).

Parameters
x: array_like

Array of shape (n,…), n>=p, containing a time series of a input variable x. The elements of x along the first dimension are assumed to be in ascending order by time, and the time intervals are assumed to be regular.

phi: list

List or array of length p+1 specifying the parameters of the AR(p) model. The parameters are in ascending order by increasing time lag, and the last element is the parameter corresponding to the innovation term eps.

eps: array_like

Optional innovation term for the AR(p) process. The shape of eps is expected to be a scalar or x.shape[1:] if len(x.shape)>1. If eps is None, the innovation term is not added.