## 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)
Run the code above in your browser using DataLab