fourierAnalysis: Extract seasonal signal from time series

Description Usage Arguments Value Examples

Description

The fast Fourier transform is used to extract the seasonal signal of a time series. The significant frequencies are found from among periods of length 2-, 3-, 4-, 6-, 12-, and 18-months.

The signal may be specified as stationary or non-stationary. If a non-stationary fit is allowed, simple linear regression estimates the long term linear trend. The seasonal signal is calculcated from the residuals.

Predicted flow (and corresponding residual) at each time point is calculated from seasonal signal and, if non-stationary, long term trend coefficient.

Usage

1
2
3
fourierAnalysis(x, stationary=F)
## S3 method for class 'ssignal'
 plot(x, plot.type="hydrograph", ...)

Arguments

x

An object of class streamflow

stationary

Logical; defaults to FALSE.

plot.type

Indicates the type of plot to create. The default "hydrograph" produces a plot of ordinary day and log normalized discharge, with the seasonal signal overlaid. "auto.corr" produces a plot of daily autocorrelation as calculated from the residual flows.

...

Other parameters.

Value

An object of class ssignal with items

signal

Data matrix augmented to included predicted and residual values.

terms

Matrix containing amplitude, phase, and frequency of seasonal signal.

detrend.fit

An lm object from regression of discharge on index of observation.

logps.regression

An lm object from regression of log power spectrum on log frequency (where log frequencies have seasonal signal removed.)

rms

list containing RMS amplitude for noise, RMS amplitude for signal, and signal-to-noise ratio.

Examples

1
2
3
4
data(sycamore)
sycamore.flows<-asStreamflow(sycamore,river.name="Sycamore Creek")
syc.seas<-fourierAnalysis(sycamore.flows)
summary(syc.seas)

Example output

Signal info 
     target.freqs target.amps target.phase idds
[1,]            1   0.9355949    -1.152302    1
[2,]            2   0.3266399    -2.322642    2

 Noise color: 1.409968 

 Average discharge: 1.055525 

 Signal-noise ratio: 71.5965 

discharge documentation built on May 2, 2019, 5:54 a.m.