# Impulse response function

### Description

Use the `fevd`

function from package vars to tompute the impulse response coefficients
of a VAR(p) (or transformed VECM to VAR(p)) for `n.ahead`

steps.

### Usage

1 2 3 4 |

### Arguments

`x` |
Object of class ‘ |

`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` |
Logical, if |

`cumulative` |
Logical, if |

`boot` |
Logical, if |

`ci` |
Numeric, the confidence interval for the bootstrapped errors bands. |

`runs` |
An integer, specifying the runs for the bootstrap. |

`seed` |
An integer, specifying the seed for the |

`...` |
Currently not used. |

### Details

The function converts the VAR or VECM computed by package tsDyn into
an object of class ‘`vec2var`

’, on which then the `irf`

method is applied. For details, see the relevant package.

### Value

A list of class ‘`varirf`

’ with the following elements is
returned:

`irf` |
A list with matrices for each of the impulse variables containing the impulse response coefficients. |

`Lower` |
If |

`Upper` |
If |

`response` |
Character vector holding the names of the response variables. |

`impulse` |
Character vector holding the names of the impulse variables. |

`ortho` |
Logical, if |

`cumulative` |
Logical, if |

`runs` |
An integer, specifying the number of bootstrap runs. |

`ci` |
Numeric, defining the confidence level. |

`boot` |
Logical, if |

`model` |
Character, containing ‘ |

### Author(s)

Bernhard Pfaff

### References

Efron, B. and R. J. Tibshirani (1993), *An Introduction to the
Bootstrap*, Chapman \& Hall, New York.

Hamilton, J. (1994), *Time Series Analysis*, Princeton
University Press, Princeton.

LÃ¼tkepohl, H. (2006), *New Introduction to Multiple Time Series
Analysis*, Springer, New York.

### See Also

`plot`

for the plot method. `lineVar`

, `VECM`

for the models.

### Examples

1 2 3 4 5 6 7 8 9 10 11 | ```
data(barry)
## For VAR
mod_var <- lineVar(barry, lag = 2)
irf(mod_var, impulse = "dolcan", response = c("dolcan", "cpiUSA", "cpiCAN"), boot =
FALSE)
## For VECM
mod_VECM <- VECM(barry, lag = 2, estim="ML", r=2)
irf(mod_VECM, impulse = "dolcan", response = c("dolcan", "cpiUSA", "cpiCAN"), boot =
FALSE)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.