Plot method for objects with class attribute varest
,
vec2var
, varcheck
, varfevd
, varirf
,
varprd
, varstabil
.
# S3 method for varcheck
plot(x, names = NULL, main.resid = NULL, main.hist =
NULL, main.acf = NULL, main.pacf = NULL, main.acf2 = NULL, main.pacf2 =
NULL, ylim.resid = NULL, ylim.hist = NULL, ylab.resid = NULL, xlab.resid
= NULL, xlab.acf = NULL, lty.resid = NULL, lwd.resid = NULL, col.resid =
NULL, col.edf = NULL, lag.acf = NULL, lag.pacf = NULL, lag.acf2 = NULL,
lag.pacf2 = NULL, mar = par("mar"), oma = par("oma"), ...)
# S3 method for varest
plot(x, names = NULL, main.fit = NULL, main.acf = NULL,
main.pacf = NULL, ylim.fit = NULL, ylim.resid = NULL, lty.fit = NULL,
lty.resid = NULL, lwd.fit = NULL, lwd.resid = NULL, lag.acf = NULL,
lag.pacf = NULL, col.fit = NULL, col.resid = NULL, ylab.fit = NULL,
ylab.resid = NULL, ylab.acf = NULL, ylab.pacf = NULL, xlab.fit = NULL,
xlab.resid = NULL, nc, mar = par("mar"), oma = par("oma"), adj.mtext =
NA, padj.mtext = NA, col.mtext = NA, ...)
# S3 method for vec2var
plot(x, ...)
# S3 method for varfevd
plot(x, plot.type = c("multiple", "single"),
names = NULL, main = NULL, col = NULL, ylim = NULL, ylab = NULL,
xlab = NULL, legend = NULL, names.arg = NULL, nc,
mar = par("mar"), oma = par("oma"), addbars = 1, ...)
# S3 method for varirf
plot(x, plot.type = c("multiple", "single"), names =
NULL, main = NULL, sub = NULL, lty = NULL, lwd = NULL, col = NULL, ylim
= NULL, ylab = NULL, xlab = NULL, nc, mar.multi = c(0, 4, 0, 4),
oma.multi = c(6, 4, 6, 4), adj.mtext = NA, padj.mtext = NA, col.mtext =
NA, ...)
# S3 method for varprd
plot(x, plot.type = c("multiple", "single"),
names = NULL, main = NULL, col = NULL, lty = NULL, lwd = NULL,
ylim = NULL, ylab = NULL, xlab = NULL, nc, mar = par("mar"),
oma = par("oma"), ...)
# S3 method for varstabil
plot(x, plot.type = c("multiple", "single"), names =
NULL, main = NULL, nc, mar = par("mar"), oma = par("oma"), ...)
Integer, number of empty bars in barplot to reserve space for legend. If set to zero, no legend will be returned.
Adjustment for mtext()
, only applicable if plot.type = "multiple"
.
Character vector, colors to use in plot.
Character, color of residuals' EDF.
Character vector, colors for diagram of fit.
Character, color for mtext()
, only applicable
if plot.type = "multiple"
.
Character vector, colors for residual plot.
Integer, lag.max for ACF of residuals.
Integer, lag.max for ACF of squared residuals.
Integer, lag.max for PACF of residuals.
Integer, lag.max for PACF of squared residuals.
Character vector of names in legend.
Integer/Character, the line types.
Vector, lty for diagram of fit.
Vector, lty for residual plot.
The width of the lines.
Vector, lwd for diagram of fit.
Vector, lwd for residual plot.
Character vector, the titles of the plot.
Character vector, main for residuals' ACF.
Character vector, main for squared residuals' ACF.
Character vector, main for diagram of fit.
Character vector, main for histogram of residuals.
Character vector, main for residuals' PACF.
Character vector, main for squared residuals' PACF.
Character vector, main for residual plot.
Setting of margins.
Setting of margins, if plot.type = "multiple"
.
Character vector, the variables names to be plotted. If
left NULL
, all variables are plotted.
Character vector, names for x-axis of barplot.
Integer, number of columns for multiple plot.
Setting of outer margins.
Setting of margins, if plot.type = "multiple"
.
Adjustment for mtext()
, only applicable if
plot.type = "multiple"
.
Character, if multiple
all plots are drawn in
a single device, otherwise the plots are shown consecutively.
Character, sub title in plot.
An object of one of the above classes.
Character vector signifying the labels for the x-axis.
Character, xlab for ACF and PACF of residuals and their squares in plot.varcheck.
Character vector, xlab for diagram of fit.
Character vector, xlab for residual plot.
Character vector signifying the labels for the y-axis.
Character, ylab for ACF.
Character vector, ylab for diagram of fit.
Character, ylab for PACF
Character vector, ylab for residual plot.
Vector, the limits of the y-axis.
Vector, ylim for diagram of fit.
Vector, ylim for histogram of residuals.
Vector, ylim for residual plot.
Passed to internal plot function.
The plot-method for objects with class attribute vec2var
is the
same as for objects with class attribute varest
. Hence, the
same arguments can be utilised.
Hamilton, J. (1994), Time Series Analysis, Princeton University Press, Princeton.
L<U+34AE5C2F>hl, 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/
VAR
, vec2var
, fevd
,
irf
, predict
, fanchart
,
stability
, arch.test
, normality.test
,
serial.test
# NOT RUN {
data(Canada)
var.2c <- VAR(Canada, p = 2, type = "const")
plot(var.2c)
## Diagnostic Testing
## ARCH test
archtest <- arch.test(var.2c)
plot(archtest)
## Normality test
normalitytest <- normality.test(var.2c)
plot(normalitytest)
## serial correlation test
serialtest <- serial.test(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