scoh: Plotting the squared coherence statistic of time series

View source: R/scoh.R

scohR Documentation

Plotting the squared coherence statistic of time series

Description

The magnitude of squared coherence is computed in a specified square set of ( \lambda_p, \lambda_q) \in [0, 2\pi) and using a specified smoothing window. The perception of this empirical spectral coherence is aided by plotting the coherence values only at points where thereshold is exceeded. For identification/discovery of PC structure, the sample periodic mean should be first subtracted from the series because a periodic mean itself has PC structure that can dominate and confound the perception of the second order PC structure.

Usage

scoh(x, m, win,...)

Arguments

x

input time series.

m

length of the smoothing window.

win

vector of smoothing weights, they should be non-negative.

...

other arguments that will be connected with squared coherence statistic plot: pfa, plflg, bfflg, ix, iy, nx, ny, datastr, where
plflg should be positive to plot values of statistic,
pfa should be positive to plot threshold,
bfflg is a Bonferroni correction parameter; it sholud be positive to correct pfa before thresholding,
ix and iy are initial values at x and y axes (the lower left corner of plot),
nx, ny are the incremental frequency indices above the starting point (ix,iy) (the ending values of frequency index are ix+nx,iy+ny),
datastr string name of data for printing.
By default they are fixed to pfa = 1, plflg = 1, bfflg = 1, ix = 0, iy = 0, nx = length(x)/2, ny = length(x)/2, datastr = "data").

Details

To ensure that periodic structure seen in the spectral coherence image is not a consequence of an additive periodic mean, it is recommended that the permest function is first used to remove the periodic mean.

Value

The program returns plot of squared coherence statistic values, that exceed threshold.

Author(s)

Harry Hurd

References

Hurd, H. L., Gerr, N. L., (1991), Graphical Methods for Determining the Presence of Periodic Correlation in Time Series, J. Time Series Anal., (12), pp. 337-350(1991).

Hurd, H. L., Miamee, A. G., (2007), Periodically Correlated Random Sequences: Spectral Theory and Practice, Wiley InterScience.

See Also

pgram, permest

Examples

## Do not run 
## It could take a few seconds

data(volumes)
m=16
win=matrix(1/m,1,m)
dev.set(which=1)
scoh(t(volumes),m,win,datastr='volumes')

perARMA documentation built on Nov. 17, 2023, 9:06 a.m.