Computes a vector of autoregressive recursive series.
Format
y = recserar(x,y0,a);
Input
x
NxK matrix
y0
PxK matrix.
a
PxK matrix.
Output
y
NxK matrix containing the series.
Remarks
recserar is particularly useful in dealing with time series.
Typically, the result would be thought of as K vectors of length N.
y0 contains the first P values of each of these vectors (thus, these are prespecified). The remaining elements are constructed by computing a Pth order “autoregressive” recursion, with weights given by a, and then by adding the result to the corresponding elements of x. That is, the tth row of y is given by:
In this example, two autoregressive series are formed using simulated data. The general form of the series can be written:
y[1,t] = rho[1,1]*y[1,t-1] + x[t,.]*b + e[1,t]
y[2,t] = rho[2,1]*y[2,t-1] + x[t,.]*b + e[2,t]
The error terms (e[1,t] and e[2,t]) are not individually serially correlated, but they are contemporaneously correlated with each other. The variance-covariance matrix is sig.