Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ccf2

Cross Correlation


Description

Produces a nice graphic of the sample CCF of two time series. The actual CCF values are returned invisibly.

Usage

ccf2(x, y, max.lag = NULL, main=NULL, ylab="CCF", na.action = na.pass, ... )

Arguments

x, y

univariate time series.

max.lag

maximum lag for which to calculate the CCF.

main

plot title - if NULL, uses x and y names.

ylab

vertical axis label; default is 'CCF'.

na.action

how to handle missing values; default is na.pass

...

additional arguments passed to acf

Details

This will produce a graphic of the sample corr[x(t+lag), y(t)] from -max.lag to max.lag. Also, the (rounded to 3 digits) values of the CCF are returned invisibly.

Author(s)

D.S. Stoffer

References

Examples

( ccf2(soi, rec) )   # now you see it
ccf2(soi, rec)       # now you don't

astsa

Applied Statistical Time Series Analysis

v1.12
GPL-3
Authors
David Stoffer
Initial release
2020-12-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.