plotdy {Spillover} | R Documentation |
Plot directional spillover index
Description
Plot directional spillover index
Usage
plotdy(
data,
direction = c("from", "to", "net", "net_pairwise", "from_to_pairwise")
)
Arguments
data |
An object class |
direction |
A character string indicating the direction of the spillover, see Diebold and Yilmaz (2012) |
Value
a ggplot2 object consisting of directional plots
References
Diebold, F. X. & Yilmaz, K.(2012). Better to Give than to Receive: Predictive Directional Measurement of Volatility Spillovers. International Journal of Forecasting.
Examples
library(Spillover)
require(tidyr)
require(dplyr)
require(ggplot2)
data(dy2012)
dy_results <- dynamic.spillover(data=dy2012, width=200, remove.own = FALSE)
pp_from <- plotdy(dy_results, direction = "from")
pp_from +
labs(title="Any title") +
facet_wrap(~variables, ncol = 2)
pp_to <- plotdy(dy_results, direction = "to")
pp_net <- plotdy(dy_results, direction = "net")
pp_netpairwise <- plotdy(dy_results, direction = "net_pairwise")
pp_from_to_pairwise <- plotdy(dy_results, direction = "from_to_pairwise")
[Package Spillover version 0.1.1 Index]