Estimates of the gain
and phase
of the dependency of series
on series
at frequency
are given by
The quantities used in these definitions are obtained as in
Section 3 in
g13cec.
Confidence limits are returned for both gain and phase, but should again be taken as very approximate when the coherency
, as calculated by
g13cfc, is not significant. These are based on the assumption that both
and
are Normal with variance
Although the estimate of
is always given in the range
, no attempt is made to restrict its confidence limits to this range.
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
- NE_BIVAR_SPECTRAL_ESTIM_ZERO
-
A bivariate spectral estimate is zero.
For this frequency the gain and the phase and their bounds are set to zero.
- NE_INT_ARG_LT
-
On entry, .
Constraint: .
- NE_INTERNAL_ERROR
-
An internal error has occurred in this function. Check the function call
and any array sizes. If the call is correct then please contact
NAG for
assistance.
- NE_REAL_ARG_LT
-
On entry, must not be less than 3.0: .
- NE_SQUARED_FREQ_GT_ONE
-
A calculated value of the squared coherency exceeds one.
For this frequency the squared coherency is reset to in the formulae for the gain and phase bounds.
- NE_UNIVAR_SPECTRAL_ESTIM_NEG
-
A bivariate spectral estimate is negative.
For this frequency the gain and the phase and their bounds are set to zero.
- NE_UNIVAR_SPECTRAL_ESTIM_ZERO
-
A bivariate spectral estimate is zero.
For this frequency the gain and the phase and their bounds are set to zero.
All computations are very stable and yield good accuracy.
The time taken by
g13cfc is approximately proportional to
ng.
The example program reads the set of univariate spectrum statistics, the 2 univariate spectra and the cross spectrum at a frequency division of for a pair of time series. It calls g13cfc to calculate the gain and the phase and their bounds and prints the results.