reform_data reforms the data into a form that is easier to use when calculating log-likelihood values etc.
reform_data(data, p)
Arguments
data: a matrix or class 'ts' object with d>1 columns. Each column is taken to represent a univariate time series. Missing values are not supported.
p: a positive integer specifying the autoregressive order
Returns
Returns the data reformed into a ((nobs−p+1)×dp) matrix. The i:th row of the matrix contains the vector (yi−1,...,yi−p)(dp×1), where yi=(y1i,...,ydi)(d×1).
Details
Assumes the observed data is y−p+1,...,y0,y1,...,yT.