R: Compute and plot the multitaper magnitude-squared coherence.

mtm.coh {multitaper} | R Documentation

## Compute and plot the multitaper magnitude-squared coherence.

### Description

Computes and plots the adaptive multitaper spectrum estimate.

### Usage

    mtm.coh(mtm1, mtm2, fr=NULL, tau=0, phcorr = TRUE, plot=TRUE, ...)

### Arguments

`mtm1` | An object created with spec.mtm(... ,returnInternals=TRUE).
`mtm2` | An object created with spec.mtm(... ,returnInternals=TRUE). Note mtm1 and mtm2 must be created with the same frequency resolution. They both must have the same values for nFFT and returnZeroFreq.
`fr` | The frequency values for the mtm object. This can be null by default (which results in computation for the full frequency range) or it can be a subset of frequency values.
`tau` | Phase-correction factor, if known.
`phcorr` | Correct phase (unwrap). By default, set to TRUE; set to FALSE if you would prefer the phase to be untouched.
`plot` | Boolean value indicating if a plot should be drawn.
`...` | Additional parameters, such as xaxs="i" which are passed through to the plotting function.

### References

Thomson, DJ (1991) Jackknifed error estimates for spectra, coherences, and transfer functions, Advances in Spectrum Estimation 58–113.

Thomson, D.J (1982) Spectrum estimation and harmonic analysis. Proceedings of the IEEE Volume 70, number 9, pp. 1055–1096.

Percival, D.B. and Walden, A.T. (1993) Spectral analysis for physical applications Cambridge University Press.

### Examples

    data(HadCRUTnh)
    data(mlco2)
    spec1 <- spec.mtm(HadCRUTnh, nw=5.0, k=8, plot=FALSE,
        returnInternals=TRUE, dtUnits="month", deltat=1.0)
    spec2 <- spec.mtm(mlco2, nw=5.0, k=8, plot=FALSE, returnInternals=TRUE,
        dtUnits="month", deltat=1.0)
    resCoh <- mtm.coh(spec1, spec2, plot=FALSE)
    plot(resCoh)
    plot(resCoh, cdfQuantilesTicks=1-10^(-(6:12)))

[Package multitaper version 1.0-13 Index]