Description Usage Arguments Examples
Find lag that maximizes correlation
1 2 3 4 5 6 7 8 | acf_max(x, ..., plot = FALSE, show = plot, ci = 0.95, ma.ci = TRUE,
max.type = c("pos", "neg", "abs"), most.signif = FALSE)
pacf_max(x, ..., plot = FALSE, show = plot, ci = 0.95,
max.type = c("pos", "neg", "abs"))
ccf_max(x, y, ..., plot = FALSE, show = plot, ci = 0.95,
max.type = c("pos", "neg", "abs"))
|
x, y |
univariate numeric vector or time series |
... |
further arguments passed to |
plot |
logical; return a plot |
show |
indicate on the plot the maximum correlation |
ci |
confidence interval used, by default 95% |
ma.ci |
should the confidence limits assume an MA input ( |
max.type |
what maximum should be returned, the positive (default), negative, or absolute maximum? |
most.signif |
should the most significant correlation be returned.
Only applicable if |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | x <- c(5, 5, 3, 6, 3, 6, 9, 6, 3, 1, 3, 2, 8, 9, 4, 3, 6, 6,
6, 7, 5, 2, 5, 1, 5, 5, 0, 3, 7, 3, 6, 6, 2, 2, 6, 5)
y <- c(8, 9, 7, 5, 3, 5, 6, 9, 6, 3, 4, 5, 9, 7, 8, 5, 5, 7,
4, 7, 7, 2, 5, 6, 5, 7, 5, 3, 5, 6, 7, 0, 5, 3, 8, 4)
acf_max(x, plot=TRUE, max.type="abs")
acf_max(x, max.type="neg")
acf_max(x, max.type="neg", most.signif=TRUE)
pacf_max(x, plot=TRUE)
pacf_max(x, max.type="abs")
ccf_max(x, y, plot=TRUE)
ccf_max(x, y, max.type="neg")
# Same plot
plot(acf(x, plot=FALSE), ci.type="ma")
acf_max(x, plot=TRUE)
acf_max(x, ci=0.99, plot=TRUE)
ccf_max(x, y, ci=0, max.type="pos", plot=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.