Learn R Programming

VARcpDetectOnline (version 0.2.0)

computeResiduals: Compute VAR Model Residuals

Description

Computes the residuals from a VAR model by subtracting the fitted values (obtained from the estimated coefficient matrices) from the original time series data.

Usage

computeResiduals(data, A)

Value

A numeric matrix of residuals.

Arguments

data

A numeric matrix of the original time series (observations in rows).

A

List. A list of VAR coefficient matrices (one for each lag).