indep_ar¶
-
hyppo.tools.
indep_ar
(n, lag=1, phi=0.5, sigma=1)¶ 2 independent, stationary, autoregressive time series simulation.
\(X_t\) and \(Y_t\) are univarite AR(
1ag
) with \(\phi = 0.5\) for both series. Noise follows \(\mathcal{N}(0, \sigma)\). With lag (1), this is\[\begin{split}\begin{bmatrix} X_t \\ Y_t \end{bmatrix} = \begin{bmatrix} \phi & 0 \\ 0 & \phi \end{bmatrix} \begin{bmatrix} X_{t - 1} \\ Y_{t - 1} \end{bmatrix} + \begin{bmatrix} \epsilon_t \\ \eta_t \end{bmatrix}\end{split}\]- Parameters
- Returns
x,y (
ndarray
) -- Simulated data matrices.x
andy
have shape(n,)
where n is the number of samples.