crscor: Cross-Covariance and Cross-Correlation

crscorR Documentation

Cross-Covariance and Cross-Correlation

Description

Compute cross-covariance and cross-correlation functions of the multivariate time series.

Usage

crscor(y, lag = NULL, outmin = NULL, outmax = NULL, plot = TRUE, ...)

Arguments

y

a multivariate time series.

lag

maximum lag. Default is 2 \sqrt{n}, where n is the length of the time series y.

outmin

bound for outliers in low side. A default value is -1.0e+30 for each dimension.

outmax

bound for outliers in high side. A default value is 1.0e+30 for each dimension.

plot

logical. If TRUE (default), cross-correlations are plotted.

...

graphical arguments passed to the plot method.

Value

An object of class "crscor" which has a plot method. This is a list with the following components:

cov

cross-covariances.

cor

cross-correlations.

mean

mean vector.

References

Kitagawa, G. (2020) Introduction to Time Series Modeling with Applications in R. Chapman & Hall/CRC.

Examples

# Yaw rate, rolling, pitching and rudder angle of a ship
data(HAKUSAN)
y <- as.matrix(HAKUSAN[, 2:4])   # Rolling, Pitching, Rudder
crscor(y, lag = 50)

# The groundwater level and the atmospheric pressure
data(Haibara)
crscor(Haibara, lag = 50)

TSSS documentation built on Sept. 29, 2023, 9:07 a.m.