Calculate either the forecast error variance or fevd (default)
in the frequency domain.
Method to calculate fevdfd for svars (id.chol)
Method to calculate fevdfd for svars (id.chol)
Usage
fevdfd(var, ...)
# S3 method for class 'svars'
fevdfd(var, freqs = c(0, 2 * pi), grid_size = 1000, fev = FALSE, ...)
# S3 method for class 'fevdvar'
fevdfd(var, freqs = c(0, 2 * pi), grid_size = 1000, fev = FALSE, ...)
Arguments
- var
A VAR. Currently supports either a 'svars' or 'fevdvar' object.
- ...
Not currently used.
- freqs
vector of length 2 of min and max frequencies (0:2pi)
- grid_size
how fine the grid to approximate the frequency domain
- fev
Boolean true to return fev not fevd
Value
List of forecast error variance decomposition in frequency domain
List of variables, each with a dataframe of shocks,
column 'f' are the frequencies.
Examples
x <- svars::USA
v <- vars::VAR(x, p = 2)
sv <- svars::id.chol(v)
fevd <- fevdfd(sv)