# ImpulseVMA: The Impulse Response Function in the Infinite MA or VMA... In portes: Portmanteau Tests for Univariate and Multivariate Time Series Models

## Description

The impulse coefficients are computed.

## Usage

 `1` ```ImpulseVMA(phi=NULL,theta=NULL,trunc.lag=NULL) ```

## Arguments

 `phi` a numeric or an array of `AR` or an array of `VAR` parameters with order p. `theta` a numeric or an array of `MA` or an array of `VMA` parameters with order q. `trunc.lag` truncation lag is used to truncate the infinite `MA` or `VMA` Process. IF it is `NULL`, then the default `trunc.lag` = p+q.

## Value

The impulse response coefficients of order `trunc.lag+1` obtained by converting the `ARMA`(p,q) or `VARMA`(p,q) process to infinite `MA` or `VMA` process, respectively.

## Author(s)

Esam Mahdi and A.I. McLeod.

## References

Lutkepohl, H. (2005). "New introduction to multiple time series analysis". Springer-Verlag, New York.

Reinsel, G. C. (1997). "Elements of Multivariate Time Series Analysis". Springer-Verlag, 2nd edition.

`ARMAtoMA`, `varima.sim`, `vma.sim`, `InvertQ`, `InvertibleQ`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25``` ```##################################################################### ### Impulse response coefficients from AR(1,1) to infinite MA process. ### The infinite process is truncated at lag 20 ### k <- 1 trunc.lag <- 20 phi <- 0.7 theta <- array(-0.9,dim=c(k,k,1)) ImpulseVMA(phi,theta,trunc.lag) ##################################################################### ### Impulse response coefficients from VAR(2) to infinite VMA process ### The infinite process is truncated at default lag value = p+q ### k <- 2 phi <- array(c(0.5,0.4,0.1,0.5,0,0.3,0,0),dim=c(k,k,2)) theta <- NULL ImpulseVMA(phi,theta) ##################################################################### ### Impulse response coefficients from VARMA(2,1) to infinite VMA process ### The infinite process is truncated at lag 50 ### k <- 2 phi <- array(c(0.5,0.4,0.1,0.5,0,0.25,0,0),dim=c(k,k,2)) theta <- array(c(0.6,0,0.2,0.3),dim=c(k,k,1)) ImpulseVMA(phi,theta,trunc.lag=50) ```

### Example output

```Loading required package: parallel
, , 1

[,1]
[1,]    1

, , 2

[,1]
[1,]  1.6

, , 3

[,1]
[1,] 1.12

, , 4

[,1]
[1,] 0.784

, , 5

[,1]
[1,] 0.5488

, , 6

[,1]
[1,] 0.38416

, , 7

[,1]
[1,] 0.268912

, , 8

[,1]
[1,] 0.1882384

, , 9

[,1]
[1,] 0.1317669

, , 10

[,1]
[1,] 0.09223682

, , 11

[,1]
[1,] 0.06456577

, , 12

[,1]
[1,] 0.04519604

, , 13

[,1]
[1,] 0.03163723

, , 14

[,1]
[1,] 0.02214606

, , 15

[,1]
[1,] 0.01550224

, , 16

[,1]
[1,] 0.01085157

, , 17

[,1]
[1,] 0.007596098

, , 18

[,1]
[1,] 0.005317269

, , 19

[,1]
[1,] 0.003722088

, , 20

[,1]
[1,] 0.002605462

, , 21

[,1]
[1,] 0.001823823

, , 1

[,1] [,2]
[1,]    1    0
[2,]    0    1

, , 2

[,1] [,2]
[1,]  0.5  0.1
[2,]  0.4  0.5

, , 3

[,1] [,2]
[1,] 0.29 0.10
[2,] 0.70 0.29

, , 1

[,1] [,2]
[1,]    1    0
[2,]    0    1

, , 2

[,1] [,2]
[1,] -0.1 -0.1
[2,]  0.4  0.2

, , 3

[,1]  [,2]
[1,] -0.01 -0.03
[2,]  0.41  0.06

, , 4

[,1]   [,2]
[1,] 0.036 -0.009
[2,] 0.176 -0.007

, , 5

[,1]    [,2]
[1,] 0.0356 -0.0052
[2,] 0.0999 -0.0146

, , 6

[,1]     [,2]
[1,] 0.02779 -0.00406
[2,] 0.07319 -0.01163

, , 7

[,1]      [,2]
[1,] 0.021214 -0.003193
[2,] 0.056611 -0.008739

, , 8

[,1]       [,2]
[1,] 0.0162681 -0.0024704
[2,] 0.0437386 -0.0066617

, , 9

[,1]        [,2]
[1,] 0.01250791 -0.00190137
[2,] 0.03368004 -0.00511726

, , 10

[,1]         [,2]
[1,] 0.009621959 -0.001462411
[2,] 0.025910209 -0.003936778

, , 11

[,1]         [,2]
[1,] 0.00740200 -0.001124883
[2,] 0.01993087 -0.003028696

, , 12

[,1]          [,2]
[1,] 0.005694087 -0.0008653112
[2,] 0.015331723 -0.0023299040

, , 13

[,1]         [,2]
[1,] 0.004380216 -0.000665646
[2,] 0.011793996 -0.001792297

, , 14

[,1]          [,2]
[1,] 0.003369507 -0.0005120527
[2,] 0.009072606 -0.0013787349

, , 15

[,1]          [,2]
[1,] 0.002592014 -0.0003938999
[2,] 0.006979160 -0.0010606000

, , 16

[,1]          [,2]
[1,] 0.001993923 -0.0003030099
[2,] 0.005368763 -0.0008158732

, , 17

[,1]          [,2]
[1,] 0.001533838 -0.0002330923
[2,] 0.004129954 -0.0006276155

, , 18

[,1]          [,2]
[1,] 0.001179914 -0.0001793077
[2,] 0.003176993 -0.0004827972

, , 19

[,1]          [,2]
[1,] 0.0009076565 -0.0001379336
[2,] 0.0024439217 -0.0003713947

, , 20

[,1]          [,2]
[1,] 0.0006982204 -0.0001061063
[2,] 0.0018800020 -0.0002856977

, , 21

[,1]          [,2]
[1,] 0.0005371104 -0.0000816229
[2,] 0.0014462033 -0.0002197747

, , 22

[,1]          [,2]
[1,] 0.0004131755 -6.278892e-05
[2,] 0.0011125009 -1.690631e-04

, , 23

[,1]          [,2]
[1,] 0.0003178379 -4.830077e-05
[2,] 0.0008557983 -1.300528e-04

, , 24

[,1]          [,2]
[1,] 0.0002444988 -3.715567e-05
[2,] 0.0006583282 -1.000440e-04

, , 25

[,1]          [,2]
[1,] 0.0001880822 -2.858223e-05
[2,] 0.0005064230 -7.695944e-05

, , 26

[,1]          [,2]
[1,] 0.0001446834 -2.198706e-05
[2,] 0.0003895691 -5.920153e-05

, , 27

[,1]          [,2]
[1,] 0.0001112986 -1.691368e-05
[2,] 0.0002996785 -4.554115e-05

, , 28

[,1]          [,2]
[1,] 8.561715e-05 -1.301096e-05
[2,] 2.305295e-04 -3.503281e-05

, , 29

[,1]          [,2]
[1,] 6.586153e-05 -1.000876e-05
[2,] 1.773363e-04 -2.694921e-05

, , 30

[,1]          [,2]
[1,] 5.066439e-05 -7.699300e-06
[2,] 1.364170e-04 -2.073085e-05

, , 31

[,1]          [,2]
[1,] 0.0000389739 -5.922735e-06
[2,] 0.0001049397 -1.594733e-05

, , 32

[,1]          [,2]
[1,] 2.998091e-05 -4.556101e-06
[2,] 8.072548e-05 -1.226759e-05

, , 33

[,1]          [,2]
[1,] 2.306301e-05 -3.504809e-06
[2,] 6.209858e-05 -9.436917e-06

, , 34

[,1]          [,2]
[1,] 1.774136e-05 -2.696096e-06
[2,] 4.776972e-05 -7.259407e-06

, , 35

[,1]          [,2]
[1,] 1.364765e-05 -2.073989e-06
[2,] 3.674716e-05 -5.584344e-06

, , 36

[,1]          [,2]
[1,] 1.049854e-05 -1.595429e-06
[2,] 2.826798e-05 -4.295792e-06

, , 37

[,1]          [,2]
[1,] 8.076069e-06 -1.227294e-06
[2,] 2.174532e-05 -3.304565e-06

, , 38

[,1]          [,2]
[1,] 6.212567e-06 -9.441033e-07
[2,] 1.672772e-05 -2.542057e-06

, , 39

[,1]          [,2]
[1,] 4.779056e-06 -7.262573e-07
[2,] 1.286791e-05 -1.955493e-06

, , 40

[,1]          [,2]
[1,] 3.676318e-06 -5.586780e-07
[2,] 9.898717e-06 -1.504275e-06

, , 41

[,1]          [,2]
[1,] 2.828031e-06 -4.297665e-07
[2,] 7.614650e-06 -1.157173e-06

, , 42

[,1]          [,2]
[1,] 2.175480e-06 -3.306006e-07
[2,] 5.857617e-06 -8.901627e-07

, , 43

[,1]          [,2]
[1,] 1.673502e-06 -2.543166e-07
[2,] 4.506008e-06 -6.847632e-07

, , 44

[,1]          [,2]
[1,] 1.287352e-06 -1.956346e-07
[2,] 3.466275e-06 -5.267584e-07

, , 45

[,1]          [,2]
[1,] 9.903034e-07 -1.504931e-07
[2,] 2.666454e-06 -4.052122e-07

, , 46

[,1]          [,2]
[1,] 7.617970e-07 -1.157678e-07
[2,] 2.051186e-06 -3.117120e-07

, , 47

[,1]          [,2]
[1,] 5.860171e-07 -8.905509e-08
[2,] 1.577888e-06 -2.397864e-07

, , 48

[,1]          [,2]
[1,] 4.507973e-07 -6.850619e-08
[2,] 1.213800e-06 -1.844572e-07

, , 49

[,1]          [,2]
[1,] 3.467787e-07 -5.269881e-08
[2,] 9.337232e-07 -1.418948e-07

, , 50

[,1]          [,2]
[1,] 2.667617e-07 -4.053889e-08
[2,] 7.182724e-07 -1.091535e-07

, , 51

[,1]          [,2]
[1,] 2.052081e-07 -3.118479e-08
[2,] 5.525355e-07 -8.396700e-08
```

portes documentation built on Jan. 13, 2021, 6:28 p.m.