[R-SIG-Finance] plotting with package vars

Ivan Sutoris ivan.sutoris at gmail.com
Sun Dec 14 12:32:06 CET 2008


Hello

I've been trying to estimate structural VAR model with package "vars"
and I've encountered some issues with plotting functions from this
package (I hope I'm posting to the right list). I'm using R 2.8.0 in
Windows:

1. After estimating VAR model with "VAR" function, I tried to plot the
result using plot method for varest object. I wanted to save plots in
separate files, so I used "names" property to create individual plots
for individual variables. However, the result showed always data for
the first variable, regardless of what I specified in names. Small
example:

library(vars)
data(Canada)
mymodel <- VAR(Canada)
plot(mymodel, names="e")
windows()   # open new figure
plot(mymodel, names="prod")

I get two figures, which are exactly the same, both plotting the fit
for "e", the first variable - this seems like a bug.

2. When plotting imuplse-response functions, (plot method for varirf
object), y-range for all variables is set the same. This can be
problematic when variables have different scales, but I haven't found
a way to specify the range manually. Is it possible?

Thanks in advance for your time

Ivan Sutoris
student (applied mathematics)
Comenius University, Bratislava, Slovakia



More information about the R-SIG-Finance mailing list