Learn R Programming

vars (version 1.1-9)

plot: Plot methods for objects in vars

Description

Plot method for objects with class attribute varest, vec2var, varcheck, varfevd, varirf, varprd, varstabil.

Usage

## S3 method for class 'varcheck':
plot(x, ...)
## S3 method for class 'varest':
plot(x, ...)
## S3 method for class 'vec2var':
plot(x, ...)
## S3 method for class 'varfevd':
plot(x, ...)
## S3 method for class 'varirf':
plot(x, ...)
## S3 method for class 'varprd':
plot(x, ...)
## S3 method for class 'varstabil':
plot(x, ...)

Arguments

x
An object of one of the above classes.
...
Currently not used.

encoding

latin1

References

Hamilton, J. (1994), Time Series Analysis, Princeton University Press, Princeton. L�tkepohl, H. (2006), New Introduction to Multiple Time Series Analysis, Springer, New York. Zeileis, A., F. Leisch, K. Hornik and C. Kleiber (2002), strucchange: An R Package for Testing for Structural Change in Linear Regression Models, Journal of Statistical Software, 7(2): 1-38, http://www.jstatsoft.org/v07/i02/

See Also

VAR, vec2var, fevd, irf, predict, fanchart, stability, arch, normality, serial

Examples

Run this code
data(Canada)
var.2c <- VAR(Canada, p = 2, type = "const")
plot(var.2c)
## Diagnostic Testing
## ARCH test
archtest <- arch(var.2c)
plot(archtest)
## Normality test
normalitytest <- normality(var.2c)
plot(normalitytest)
## serial correlation test
serialtest <- serial(var.2c)
plot(serialtest)
## FEVD
var.2c.fevd <- fevd(var.2c, n.ahead = 5)
plot(var.2c.fevd)
## IRF
var.2c.irf <- irf(var.2c, impulse = "e",
response = c("prod", "rw", "U"), boot = FALSE)
plot(var.2c.irf)
## Prediction
var.2c.prd <- predict(var.2c, n.ahead = 8, ci = 0.95)
plot(var.2c.prd)
## Stability
var.2c.stabil <- stability(var.2c, type = "Rec-CUSUM")
plot(var.2c.stabil)

Run the code above in your browser using DataLab