spec.mtm.cross: Compute cross-covariance sequence from two spectral objects.

spec.mtm.crossR Documentation

Compute cross-covariance sequence from two spectral objects.

Description

This function computes the cross-covariance sequence from two spectral objects. It requires that the spectral objects were computed with the 'returnInternals' argument set to TRUE. The two spectral objects must have the same parameters for successful computation. The function can also limit the maximum lag for the cross-covariance sequence.

Usage

spec.mtm.cross(sp1, sp2, maxlag = NULL)

Arguments

sp1

The first spectral object.

sp2

The second spectral object.

maxlag

Maximum lag for the cross-covariance sequence (optional).

Details

The function computes the cross-covariance sequence by utilizing the spectral properties of two input spectral objects. The 'maxlag' parameter controls the maximum lag for the cross-covariance sequence. Ensure that the spectral objects are computed with the 'returnInternals' argument set to TRUE and have consistent parameters.

Value

A cross-covariance sequence.

Examples

sp1 <- multitaper::spec.mtm(x1, nw = 4, k = 5, returnInternals = TRUE)
sp2 <- multitaper::spec.mtm(x2, nw = 4, k = 5, returnInternals = TRUE)
spec.mtm.cross(sp1, sp2)


wesleyburr/tsinterp documentation built on Jan. 28, 2024, 11:16 a.m.