# Rubio-Ramirez et al's (2010) rejection method

### Description

Identifies stuctural shocks using Rubio-Ramirez et al's (2010) rejection method and estimates a Bayesian vector autoregression model with a flat Normal inverted-Wishart prior.

### Usage

1 2 | ```
rwz.reject(Y=NULL, nlags=4, draws=200, subdraws=200, nkeep=1000,
KMIN=1, KMAX=4, constrained=NULL, constant=TRUE, steps=24)
``` |

### Arguments

`Y` |
A ts object containing the data series used for estimation; this should be of size |

`nlags` |
The number of lags to include of each variable. The default value is 4. |

`draws` |
An integer value for the number of Markov Chain Monte Carlo (MCMC) sampling replications. The default value is 200. |

`subdraws` |
An integer value for the number of sub-draws over the rejection routine. The default value is 200. |

`nkeep` |
An integer value for the number of desired MCMC draws that meet the imposed sign restrictions. The default value is 1000. |

`KMIN` |
An integer value for the first period of the impulse responses to which the sign restrictions apply. The default value is 1. |

`KMAX` |
An integer value for the last period of the impulse responses to which the sign restrictions apply. The default value is 4. |

`constrained` |
A list of sign restrictions of length |

`constant` |
A logical statement on whether to include an intercept in the model. The default is 'TRUE'. |

`steps` |
An integer value for the horizon of the impulse response calculations. The default value is 24. |

### Details

This function estimates a BVAR model using a flat Normal inverted-Wishart prior. Structural shocks are identified using Rubio-Ramirez et al's (2010) rejection method. The size of the shock is one standard deviation. `rwz.reject`

is a partial identification method. Only one shock of interest is identified at a time by the sign restrictions provided. The MCMC routine stops when either enough draws have been found that satisfy the sign restrictions (specified in `nkeep`

) or the maximum number of `draws`

has been reached.

Sign restrictions are specified as follows: The first entry of `constrained`

is the shock of interest corresponding to the column of the variable in *Y*. You MUST specify a sign restriction for the shock of interest on itself. Restrictions of the shock of interest on other variables are optional. The sign of the entry in the list corresponds to the direction of the sign, e.g. >0 or <0. Variables that are not listed in `constrained`

remain unconstrained. In the example below, the shock of interest is the 4th variable (FED funds rate) in *Y*. The sign indicates that the effect on itself is contrained to be positive. The responses of the 2nd, 3rd, and 5th variable in the model to a positive FED funds rate shock is restricted to be negative. The responses of the 1st and 6th variable are unconstrained.

### Value

A list of the posterior draws, which contains:

`IRFS` |
A |

`FEVDS` |
A |

`SHOCKS` |
A |

`Bdraws ` |
A |

`Sdraws ` |
A |

### Note

Users should consult the reference papers and the package vignette for more information.

### Author(s)

Christian Danne

### References

Rubio-Ramirez, J., Waggoner, D. and Zha, T. (2010), "Structural Vector Autoregressions: Theory of Identification and Algorithms for Inference", Review of Economic Studies, 77, 665-696.

### See Also

`rfbvar`

, `uhlig.reject`

, `uhlig.penalty`

, `fp.target`

, `irfplot`

, `fevdplot`

.

### 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 26 27 28 29 30 31 32 33 | ```
## Not run:
# Replication of Figure 6 of Uhlig (2005) using Rubio-Ramirez et al's method
set.seed(12345)
data(uhligdata)
# variable labels for plots
vl <- c("GDP","GDP Deflator","Comm.Pr.Index","Fed Funds Rate",
"NB Reserves", "Total Reserves")
# sign restrictions
# shock of interest enters first.
# you MUST provide a restriction for the shock of interest
# restriction variable 4 is >0
# 2nd, 3rd, and 5th variable are <0.
# 1st and 6th variable are unrestricted
constr <- c(+4,-3,-2,-5)
# estimates the model
model3 <- rwz.reject(Y=uhligdata, nlags=12, draws=200, subdraws=200, nkeep=1000,
KMIN=1, KMAX=6, constrained=constr, constant=FALSE, steps=60)
# get posterior draws
irfs3 <- model3$IRFS
# plot impulse response functions
irfplot(irfdraws=irfs3, type="median", labels=vl, save=FALSE, bands=c(0.16, 0.84),
grid=TRUE, bw=FALSE)
## End(Not run)
``` |