2 independent, stationary, autoregressive time series simulation.
Xt and Yt are univarite AR(1ag
) with
ϕ=0.5 for both series. Noise follows
N(0,σ). With lag (1), this is
[XtYt]=[ϕ00ϕ][Xt−1Yt−1]+[ϵtηt]
- Parameters
n (int
) -- The number of samples desired by the simulation (>= 3).
lag (float
, default: 1
) -- The maximum time lag considered between x
and y
.
phi (float
, default: 0.5
) -- The AR coefficient.
sigma (float
, default: 1
) -- The variance of the noise.
- Returns
x,y (ndarray
of float
) -- Simulated data matrices. x
and y
have shape (n,)
where n is the number of samples.