Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

residToMat

Converts the output of a GNARfit call to fitted and residual value matrices


Description

Unstacks the entries of the GNARfit fitted and residual values to return matrices of a similar form to the multivariate time series input.

Usage

residToMat(GNARobj=GNARfit(), nnodes=5)

Arguments

GNARobj

the output from the GNARfit function

nnodes

the number of nodes in the original network time series

Details

This function also replaces the NAs that were removed in fitting.

Value

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.

Examples

#Get residual and fitted matrices from GNARpredict fit of fiveVTS
residToMat()

GNAR

Methods for Fitting Network Time Series Models

v1.1.1
GPL-2
Authors
Kathryn Leeming [aut], Guy Nason [aut], Matt Nunes [aut, cre], Marina Knight [ctb]
Initial release
2020-11-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.