The Spectral Functions
We provide functions for spectral analysis as below.
- pgram(x):periodogram - basic periodogram computation for series x, note
series mean is removed
- splot(x): Potting function against frequency (angular)
- staper(x,k):Untility function for multitaler spectral function.
Series in x.
- mtaper(x,k):Multitaper spectral estimate , does not use dpss tapers but sinusoidal ones
.Needs staper. Series is x k is the number of tapers
- parzen(m, n): Utility function used by Parzen spectrum function
- specp (pgram, m) :Spectrum estimate,smoothed parzen windowed
estimate. The smoothing parameter is m ,pgram is the periodogram of the
series.
- spec(pgram,m) : Smoothed spectrum estimate. This is a smoothed windowed
estimate, pgram is the periodogram and m is window length. Uses simple averaging
- ufilter(phi,res,top=T):A utility function that computse the squared
gain for a filter y(t)=phi(B)x(t). If top is False then the model is
phi(B)y(t)=x(t). Values are retuned for range -pi to pi
h. y is the series to be smooth and x the time sequence.
- fullsplot<-function(x): As splot but plots over -pi to pi
- tspec(phi,theta): Computes and plots a rational spectrum for
phi(B)x(t)=theta(b)a(t) over -pi to pi
- swindow(x,k): Utility smoothing function used by crossspectrum function
- crossspec2(x,y,k,pt=T): crossspectrum function, k is smoothing value. Plots if pt=T
- crosspgram(x,y,k,pt=T): crossperiodogram function. Plots if pt=T
For the code go here