Improved version of the
function in the
stats package. First it allows
embeddings in past and future observation space (backward
and forward shift). Secondly, it adds 'NA' to the
beginning (or end) of the embedding matrix, depending on
the dimension of the embedding. Optionally, they can be
a numeric vector, matrix, or time series.
a scalar representing the embedding
dimension in past or future. Note that contrary to
'dimension = 1' in
logical; if TRUE, it removes NA values automatically from embedded matrix.