Plot the results of cross-correlation analysis using ggplot2
(rather than R base plot) for more flexible modification of the plot.
Arguments
- formula
Model formula like
y ~ x
.- data
Data frame.
- lag.max
Maximum time lag. Defaults to
30
.- sig.level
Significance level. Defaults to
0.05
.- xbreaks
X-axis breaks.
- ybreaks
Y-axis breaks.
- ylim
Y-axis limits. Defaults to
NULL
to automatically estimate.- alpha.ns
Color transparency (opacity: 0~1) for non-significant values. Defaults to
1
for no transparency (i.e., opaque color).- pos.color
Color for positive values. Defaults to
"black"
.- neg.color
Color for negative values. Defaults to
"black"
.- ci.color
Color for upper and lower bounds of significant values. Defaults to
"blue"
.- title
Plot title. Defaults to an illustration of the formula.
- subtitle
Plot subtitle.
- xlab
X-axis title. Defaults to
"Lag"
.- ylab
Y-axis title. Defaults to
"Cross-Correlation"
.
Details
Significant correlations with negative time lags suggest shifts in a predictor precede shifts in an outcome.