# irfplot

## Syntax

## Description

`irfplot`

plots the IRFs of the state and measurement variables in a state-space model. To return the IRFs as numeric arrays instead, use `irf`

. Other state-space model tools to characterize the dynamics of a specified system include:

The forecast error variance decomposition (FEVD), computed by

`fevd`

, provides information about the relative importance of each state disturbance in affecting the forecast error variance of all measurement variables in the system.Model-implied temporal correlations, computed by

`corr`

for a standard state-space model, measure the association between present and past state or measurement variables, as prescribed by the form of the model.

### Fully Specified State-Space Model

`irfplot(`

plots the IRF, or `Mdl`

)*dynamic response*, of each state and measurement variable of the fully specified state-space model `Mdl`

, such as an estimated model. `irfplot`

plots a figure containing the IRFs of the measurement variables *y*_{t}, and plots a separate figure containing the IRFs of the state variables *x*_{t}. Each figure contains a subplot for each variable and state disturbance combination; subplot (*i*,*j*) is the IRF of variable *j* resulting from a unit shock applied to a state disturbance *i*
*u*_{i,t}. Subplot titles identify the shocked variable and IRF variable.

`irfplot(`

uses additional options specified by one or more name-value pair arguments. For example, `Mdl`

,`Name,Value`

)`'PlotU',1:2,'PlotX',[]`

plots only the measurement variable IRFs resulting from shocks applied to the first and second state-disturbance variables (the state variable IRF plot is suppressed).

### Partially Specified State-Space Model and Confidence Interval Estimation

`irfplot(___,`

also plots pointwise lower and upper 95% Monte Carlo confidence bounds in each plot. `'Params'`

,estParams,`'EstParamCov'`

,EstParamCov)`EstParamCov`

specifies the estimated covariance matrix of the parameter estimates, as returned by the `estimate`

function, and is required for confidence interval estimation.

### Customize Figures

`irfplot(`

plots on the axes objects specified by `ax`

,___)`ax`

instead of new figures. The option `ax`

can precede any of the input argument combinations in the previous syntaxes.

## Examples

## Input Arguments

## Output Arguments

## More About

## Algorithms

If you specify

`'eigendecomposition'`

for the`'Method'`

name-value pair argument,`irfplot`

attempts to diagonalize the state-transition matrix*A*by using the spectral decomposition.`irfplot`

resorts to recursive multiplication instead under at least one of these circumstances:An eigenvalue is complex.

The rank of the matrix of eigenvectors is less than the number of states

`Mdl`

is time varying.

`irfplot`

uses Monte Carlo simulation to compute confidence intervals.`irfplot`

randomly draws`NumPaths`

variates from the asymptotic sampling distribution of the unknown parameters in`Mdl`

, which is N_{p}(`Params`

,`EstParamCov`

), where*p*is the number of unknown parameters.For each randomly drawn parameter set

*j*,`irfplot`

:Creates a state-space model that is equal to

`Mdl`

, but substitutes in parameter set*j*Computes the random IRF of the resulting model

*ψ*_{j}(*t*), where*t*= 1 through`NumPaths`

For each time

*t*, the lower bound of the confidence interval is the`(1 –`

quantile of the simulated IRF at period)/2`c`

*t**ψ*(*t*), where

=`c`

`Confidence`

. Similarly, the upper bound of the confidence interval at time*t*is the`(1 –`

upper quantile of)/2`c`

*ψ*(*t*).

## Version History

**Introduced in R2020b**