Learn R Programming

ADTSA (version 1.0.1)

Cal_Cross_Corr: Calculation of Cross-Correlation

Description

This function calculates the cross correlation between two time series.

Usage

Cal_Cross_Corr(ts1, ts2, max_lag)

Value

A data frame.

Arguments

ts1

a numeric vector of the first time series data.

ts2

a numeric vector of the second time series data.

max_lag

maximum lag at which to compute cross-correlation.

Author

Hossein hassani, Masoud yarmohammadi, Mohammad reza yeganegi and Leila Marvian Mashhad.

Examples

Run this code
data(co2)
data(sunspots)
Cal_Cross_Corr(co2,sunspots,4)

Run the code above in your browser using DataLab