plot.ms.irf: Color plot of MSBVAR impulse response functions

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Provides an overplotted, color-coded version of the MSBVAR IRFs plot. This is an experimental function using color rather than the separate plots produced in plot.mc.irf

Usage

1
2
3
## S3 method for class 'ms.irf'
plot(x, method = "Sims-Zha2", component = 1,
            probs = c(0.16, 0.84), varnames = attr(x, "eqnames"), ...)

Arguments

x

Output of the mc.irf function for an MSBVAR model via gibbs.msbvar

method

Method to be used for the error band construction. Default method is to use the eigendecomposition method proposed by Sims and Zha. Defined methods are "Percentile" (error bands are based on percentiles specified in probs), "Normal Approximation" (Gaussian approximation for interval of width probs), "Sims-Zha1" (Gaussian approximation with linear eigendecomposition), "Sims-Zha2" (Percentiles with eigendecomposition for each impulse response function), "Sims-Zha3" (Percentiles with eigendecomposition of the full stacked impulse responses)

component

If using one of the eigendecomposition methods, the eigenvector component to be used for the error band construction. Default is the first or largest eigenvector component.

probs

is the width of the error bands. Default is c(0.16, 0.84) which is a 68% band that is approximately one standard deviation, as suggested by Sims and Zha.

varnames

List of variable names of length m for labeling the impulse responses. Default are the input variable names from the relevent estimation method.

...

Other graphics parameters.

Details

This function plots the output of a Monte Carlo simulation of MSBVAR impulse response functions produced by mc.irf. The function allows the user to choose among a variety of frequentist (normal appproximation and percentile) and Bayesian (eigendecomposition) methods for constructing error bands around a set of impulse responses. Impulses or shocks are in the columns and the rows are the responses. Here the plot colors the responses for each reqime, per the R default color pallette for colors 1:h.

Value

The primary reason for this function is to plot impulse responses and their error bands. Secondarily, it returns an invisible list of the impulses responses, their error bands, and summary measures of the fractions of the variance in the eigenvector methods that explain the total variation of each response.

responses

Responses and their error bands

eigenvector.fractions

Fraction of the variation in each response that is explained by the chosen eigenvectors. NULL for non-eigenvector methods.

Author(s)

Patrick T. Brandt

References

Brandt, Patrick T. and John R. Freeman. 2006. "Advances in Bayesian Time Series Modeling and the Study of Politics: Theory Testing, Forecasting, and Policy Analysis" Political Analysis 14(1):1-36.

Sims, C.A. and Tao Zha. 1999. "Error Bands for Impulse Responses." Econometrica. 67(5): 1113-1156.

See Also

plot.mc.irf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
data(IsraelPalestineConflict)
m1 <- msbvar(IsraelPalestineConflict, p=1, h=2, lambda0=0.6,
             lambda1=0.1, lambda3=1, lambda4=0.5, lambda5=0,
             mu5=0, mu6=0, qm=12, alpha.prior=matrix(10, 2, 2),
             prior=0, max.iter=20)
m2p <- gibbs.msbvar(m1, N1=1000, N2=10000, permute=FALSE, Sigma.idx=1)

irf2 <- mc.irf(m2p, nsteps=12)
plot.ms.irf(irf2)


## End(Not run)

MSBVAR documentation built on May 30, 2017, 1:23 a.m.

Related to plot.ms.irf in MSBVAR...