Impulse Responses.
irf.Rd
Alias for the function from svars::irf.svars, so that the shock names are correct.
Usage
# S3 method for class 'fevdvar'
irf(
x,
impulse = NULL,
response = NULL,
n.ahead = 10,
ortho = TRUE,
cumulative = FALSE,
boot = TRUE,
ci = 0.95,
runs = 100,
seed = NULL,
as_matrix = FALSE,
...
)
# S3 method for class 'bvartools'
irf(
x,
impulse = NULL,
response = NULL,
n.ahead = 10,
ortho = TRUE,
cumulative = FALSE,
boot = TRUE,
ci = 0.95,
runs = 100,
seed = NULL,
...
)
Arguments
- x
SVAR object of class "fevdvar".
- impulse
A character vector of the impulses, default is all variables.
- response
A character vector of the responses, default is all variables.
- n.ahead
Integer specifying the steps.
- ortho
Not used. Here to match generic vars::irf.
- cumulative
Not used. Here to match generic vars::irf.
- boot
Not used. Here to match generic vars::irf.
- ci
Not used. Here to match generic vars::irf.
- runs
Not used. Here to match generic vars::irf.
- seed
Not used. Here to match generic vars::irf.
- as_matrix
Default to False. Set to true to return a 3D matrix instead of a data.frame.
- ...
Currently not used.
Value
Matrix of forecast error variance decomposition in frequency domain Indexed: frequencies, variables, shocks
Examples
x <- svars::USA
v <- vars::VAR(x, p = 2)
mvar <- id_fevdtd(v, "pi", 4:10)
vars::irf(mvar)
#> $irf
#> h impulse response irf
#> 1 1 Main x 0.067787261
#> 2 1 Main pi 1.064167220
#> 3 1 Main i 0.272985376
#> 4 1 Orth_2 x 0.712912349
#> 5 1 Orth_2 pi -0.183426009
#> 6 1 Orth_2 i 0.348084767
#> 7 1 Orth_3 x 0.088275371
#> 8 1 Orth_3 pi 0.111448857
#> 9 1 Orth_3 i -0.805142889
#> 10 2 Main x 0.099624559
#> 11 2 Main pi 0.715310130
#> 12 2 Main i 0.371566912
#> 13 2 Orth_2 x 0.808657657
#> 14 2 Orth_2 pi -0.077576485
#> 15 2 Orth_2 i 0.626426159
#> 16 2 Orth_3 x 0.044770396
#> 17 2 Orth_3 pi -0.092187863
#> 18 2 Orth_3 i -0.794788673
#> 19 3 Main x 0.068895477
#> 20 3 Main pi 0.758830339
#> 21 3 Main i 0.491118102
#> 22 3 Orth_2 x 0.742597957
#> 23 3 Orth_2 pi 0.005724510
#> 24 3 Orth_2 i 0.659607290
#> 25 3 Orth_3 x 0.092826448
#> 26 3 Orth_3 pi -0.031024691
#> 27 3 Orth_3 i -0.726050307
#> 28 4 Main x 0.028155426
#> 29 4 Main pi 0.703114881
#> 30 4 Main i 0.554410409
#> 31 4 Orth_2 x 0.611256994
#> 32 4 Orth_2 pi 0.056005124
#> 33 4 Orth_2 i 0.612648879
#> 34 4 Orth_3 x 0.161344352
#> 35 4 Orth_3 pi -0.042662458
#> 36 4 Orth_3 i -0.635548847
#> 37 5 Main x -0.024735313
#> 38 5 Main pi 0.669283235
#> 39 5 Main i 0.598832154
#> 40 5 Orth_2 x 0.470687648
#> 41 5 Orth_2 pi 0.093036484
#> 42 5 Orth_2 i 0.540241779
#> 43 5 Orth_3 x 0.222298650
#> 44 5 Orth_3 pi -0.025868304
#> 45 5 Orth_3 i -0.536156578
#> 46 6 Main x -0.080412175
#> 47 6 Main pi 0.628381133
#> 48 6 Main i 0.623226723
#> 49 6 Orth_2 x 0.343408691
#> 50 6 Orth_2 pi 0.115580811
#> 51 6 Orth_2 i 0.466939339
#> 52 6 Orth_3 x 0.269585303
#> 53 6 Orth_3 pi -0.010405058
#> 54 6 Orth_3 i -0.444305757
#> 55 7 Main x -0.135717174
#> 56 7 Main pi 0.587175705
#> 57 7 Main i 0.633654075
#> 58 7 Orth_2 x 0.236391029
#> 59 7 Orth_2 pi 0.128328241
#> 60 7 Orth_2 i 0.402430235
#> 61 7 Orth_3 x 0.301062110
#> 62 7 Orth_3 pi 0.008532501
#> 63 7 Orth_3 i -0.362056711
#> 64 8 Main x -0.187973205
#> 65 8 Main pi 0.544426035
#> 66 8 Main i 0.632754410
#> 67 8 Orth_2 x 0.149940594
#> 68 8 Orth_2 pi 0.133535680
#> 69 8 Orth_2 i 0.348852398
#> 70 8 Orth_3 x 0.318339266
#> 71 8 Orth_3 pi 0.027944614
#> 72 8 Orth_3 i -0.290225971
#> 73 9 Main x -0.235678404
#> 74 9 Main pi 0.500828421
#> 75 9 Main i 0.622905312
#> 76 9 Orth_2 x 0.081673205
#> 77 9 Orth_2 pi 0.133300686
#> 78 9 Orth_2 i 0.305427595
#> 79 9 Orth_3 x 0.323772055
#> 80 9 Orth_3 pi 0.047148780
#> 81 9 Orth_3 i -0.227842236
#> 82 10 Main x -0.277913586
#> 83 10 Main pi 0.456705816
#> 84 10 Main i 0.605852010
#> 85 10 Orth_2 x 0.028512851
#> 86 10 Orth_2 pi 0.129139282
#> 87 10 Orth_2 i 0.270339476
#> 88 10 Orth_3 x 0.319861737
#> 89 10 Orth_3 pi 0.065326409
#> 90 10 Orth_3 i -0.173692001
#>
#> attr(,"class")
#> [1] "fevdirf"