Converts the output of a GNARfit call to fitted and residual value matrices
Unstacks the entries of the GNARfit fitted and residual values to return matrices of a similar form to the multivariate time series input.
residToMat(GNARobj=GNARfit(), nnodes=5)
GNARobj
: the output from the GNARfit functionnnodes
: the number of nodes in the original network time seriesThis function also replaces the NAs that were removed in fitting.
resid: is the matrix of residual values, with t-alphaOrder
rows and nnodes
columns.
fit: is the matrix of fitted values, with t-alphaOrder
rows and nnodes
columns.
#Get residual and fitted matrices from GNARpredict fit of fiveVTS residToMat()
Useful links