## Not run:
# # Replication of Figure 14 of Uhlig (2005)
#
# 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
# model2 <- uhlig.penalty(Y=uhligdata, nlags=12, draws=2000, subdraws=1000,
# nkeep=1000, KMIN=1, KMAX=6, constrained=constr,
# constant=FALSE, steps=60, penalty=100, crit=0.001)
#
# # get posterior draws
# irfs2 <- model2$IRFS
#
# # plot impulse response functions
# irfplot(irfdraws=irfs2, type="mean", 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