pysteps.timeseries.autoregression.iterate_var_model

pysteps.timeseries.autoregression.iterate_var_model#

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

Apply a VAR(p) model

\(\mathbf{x}_{k+1}=\mathbf{\Phi}_1\mathbf{x}_k+\mathbf{\Phi}_2 \mathbf{x}_{k-1}+\dots+\mathbf{\Phi}_p\mathbf{x}_{k-p}+ \mathbf{\Phi}_{p+1}\mathbf{\epsilon}\)

to a q-variate time series \(\mathbf{x}_k\).

Parameters:
  • x (array_like) – Array of shape (n,q,…), n>=p, containing a q-variate 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 of parameter matrices \(\mathbf{\Phi}_1,\mathbf{\Phi}_2,\dots, \mathbf{\Phi}_{p+1}\).

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