Learn R Programming

tsDyn (version 11.0.4.1)

plot_ECT: Plot the Error Correct Term (ECT) response

Description

This plot shows how variables in a (T)VECM respond to deviations from the long-term equilibrium

Usage

plot_ECT(x, add.legend = TRUE, legend.location = "topright", ...)

Value

a plot, and invisibly the underlying data.frame, containing the ECT and the response for each variable

Arguments

x

object of class VECM or TVECM

add.legend

logical. Whether to add a legend?

legend.location

character. Location of the legend, see legend

...

arguments passed to the initial plot call, see plot

Examples

Run this code
data(zeroyld)
vec_l1 <- VECM(zeroyldMeta[, c("long.run", "short.run")], lag =1)
tvec_l1 <- TVECM(zeroyldMeta[, c("long.run", "short.run")], lag =1, 
                plot  = FALSE, trace = FALSE, th1 = list(exact = -1.263))

plot_ECT(vec_l1)
plot_ECT(tvec_l1, legend.location = "bottomright")

Run the code above in your browser using DataLab