Provides a quick way to visualize the lag decay
specification in a BVAR model for given parameters by computing the
variance of the prior VAR coefficients across various lags.
Usage
decay.spec(qm, p, lambda)
Arguments
qm
Periodicity parameter: either 4 or 12 for quarterly or
monthly data.
p
Number of lags
lambda
Lag decay parameter [>0], which is lambda3 in
the Sims-Zha BVAR specification in szbvar
Details
Computes the relative decay in the prior variance of the VAR prior
across the lags from 1 to
p. Useful for visualizing the rate of decay or how tight the prior
becomes at higher order lags.
Value
A time series of length p of the prior variances for each lag.
Author(s)
Patrick T. Brandt
References
Sims, C.A. and Tao Zha. 1998. "Bayesian Methods for Dynamic
Multivariate Models." International Economic Review. 39(4):949-968.
See Also
szbvar
Examples
# Harmonic lag decay example
harmonic <- decay.spec(4, 6, 1)
# Quadratic lag decay example
quadratic <- decay.spec(4, 6, 2)
plot(cbind(harmonic,quadratic))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MSBVAR)
##
## MSBVAR Package v.0.9-2
## Build date: Mon Jul 4 19:52:59 2016
## Copyright (C) 2005-2016, Patrick T. Brandt
## Written by Patrick T. Brandt
##
## Support provided by the U.S. National Science Foundation
## (Grants SES-0351179, SES-0351205, SES-0540816, and SES-0921051)
##
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MSBVAR/decay.spec.Rd_%03d_medium.png", width=480, height=480)
> ### Name: decay.spec
> ### Title: Lag decay specification check
> ### Aliases: decay.spec
> ### Keywords: ts
>
> ### ** Examples
>
> # Harmonic lag decay example
> harmonic <- decay.spec(4, 6, 1)
>
> # Quadratic lag decay example
> quadratic <- decay.spec(4, 6, 2)
>
> plot(cbind(harmonic,quadratic))
>
>
>
>
>
>
> dev.off()
null device
1
>