Skip to content
Prev 176020 / 398506 Next

embed?

rkevinburton at charter.net wrote:
following this 'explanation', the first row consists of values x[t],
x[t-1], ... x[t-3+1], that is, x[t], x[t-1], x[t-2].  how does t, the
original index of x, relate to positions in the matrix?  does it
correspond to the row number, or the column number?  it can't be the
former, because then the first row would include x[1], x[0], x[-1] --
nonsense.  it can't be the latter, because the first row would include
x[1], x[1], x[1] (nonsense), and so all other rows (nonsense).

for a vector, say x, the output, say matrix, contains values calculated
as follows:

    m[i,j] = x[i + dimension - j], with i = 1, ...,
length(x)-dimension+1 and j = 1, ..., dimension

so that you have a rolling window over the vector, with row indices
corresponding to the start of the window, and column indices
corresponding to the position within the window.

arguably, the authors could have done their homework better.

vQ