| crossq.plot | R Documentation | 
This function creates a plot of the cross-quantilogram with confidence intervals. It computes the cross-quantilogram and its confidence intervals using stationary bootstrap, then creates a ggplot visualization of the results.
crossq.plot(
  DATA,
  vecA,
  Kmax,
  Bsize,
  sigLev = 0.05,
  vec.lag,
  vec.CQ,
  mat.CI,
  y.min = -1,
  y.max = 1,
  ribbon_color = "gray",
  ribbon_alpha = 0.8,
  bar_color = "black",
  bar_width = 0.2,
  title = "",
  subtitle = NULL
)
DATA | 
 A matrix of dimensions T x 2, where T is the number of observations. Column 1 contains the first variable and Column 2 contains the second variable.  | 
vecA | 
 A numeric vector of quantiles for the first variable.  | 
Kmax | 
 An integer representing the maximum lag to compute.  | 
Bsize | 
 Bootstrap sample size for stationary bootstrap.  | 
sigLev | 
 Significance level for confidence intervals. Default is 0.05 (95% confidence level).  | 
vec.lag | 
 A vector of lag values (integer values). Not used in computation, only for plotting.  | 
vec.CQ | 
 A numeric vector of cross-quantilogram values. Not used in computation, only for plotting.  | 
mat.CI | 
 A matrix with two columns representing the lower and upper bounds of the confidence interval. Not used in computation, only for plotting.  | 
y.min | 
 The minimum y-axis value. Default is -1.  | 
y.max | 
 The maximum y-axis value. Default is 1.  | 
ribbon_color | 
 Color for the confidence interval ribbon. Default is "gray".  | 
ribbon_alpha | 
 Alpha (transparency) for the confidence interval ribbon. Default is 0.8.  | 
bar_color | 
 Color for the quantilogram bars. Default is "black".  | 
bar_width | 
 Width of the quantilogram bars. Default is 0.2.  | 
title | 
 Plot title. Default is an empty string.  | 
subtitle | 
 Plot subtitle. Default is NULL (no subtitle).  | 
A list containing two elements:
plot | 
 A ggplot object representing the cross-quantilogram plot over lags.  | 
df.res | 
 A data frame containing cross-quantilogram values and critical values. It includes the following columns: 
  | 
A list containing two elements:
plot | 
 A ggplot object representing the cross-quantilogram plot.  | 
df.res | 
 A data frame containing lag values, cross-quantilogram values, and confidence intervals.  | 
Heejoon Han, Oliver Linton, Tatsushi Oka and Yoon-Jae Whang
Han, H., Linton, O., Oka, T., and Whang, Y. J. (2016). "The cross-quantilogram: Measuring quantile dependence and testing directional predictability between time series." Journal of Econometrics, 193(1), 251-270.
## Not run: 
data("sys.risk")
DATA = sys.risk[,c("JPM", "Market")]
vecA = 0.05
Kmax = 20
Bsize = 200
result = crossq.plot(DATA, vecA, Kmax, Bsize)
print(result$plot)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.