Learn R Programming

kza (version 4.2.1)

kzp: Kolmogorov-Zurbenko Periodogram

Description

Kolmogorov-Zurbenko periodogram and smoothing using DiRienzo-Zurbenko (DZ).

Usage

kzp(y, m=length(y), k=1)
# S3 method for kzp
smooth(object, log=TRUE, smooth_level=0.05, method = "DZ")
# S3 method for kzp
nonlinearity(x)
# S3 method for kzp
variation(x)
# S3 method for kzp
summary(object, digits=getOption("digits"), top=1, ...)
# S3 method for kzp
plot(x, ...)

Arguments

y

The raw data.

m

The width of filtering window. Must be odd; KZFT's band-pass transfer-function properties are proven only for odd window lengths.

k

The number of iterations for the KZFT

object

Output from kzp function.

log

Use logarithm values for smoothing.

smooth_level

Percentage of smoothness to apply. The cutoff is smooth_level times the total of the roughness measure; at each frequency the smoothing half-window is the largest one whose cumulative roughness stays at or below that cutoff. (The original papers describe stopping at the first window whose measure reaches the cutoff, which is one growth step later.)

method

Method used for smoothing; choices are "DZ" or "NZ".

digits

precision of output.

top

list top values

...

Other parameters.

x

periodogram

Details

The Kolmogorov-Zurbenko Periodogram is an estimate of the spectral density using the Kolmogorov-Zurbenko Fourier Transform (KZFT).

References

I. G. Zurbenko, 1986: The spectral Analysis of Time Series. North-Holland, 248 pp.

I. G. Zurbenko, P. S. Porter, Construction of high-resolution wavelets, Signal Processing 65: 315-327, 1998.

A. G. DiRienzo, I. G. Zurbenko, Semi-adaptive nonparametric spectral estimation, Journal of Computational and Graphical Statistics 8(1): 41-59, 1998.

R. Neagu, I. G. Zurbenko, Algorithm for adaptively smoothing the log-periodgram, Journal of the Franklin Institute 340: 103-123, 2003.

Wei Yang and Igor Zurbenko, kzft: Kolmogorov-Zurbenko Fourier Transform and Applications, R-Project 2007.

See Also

kzft, kztp,

Examples

Run this code
if (FALSE) {
t<-1:6000
f1<-0.03
f2<-0.04
noise<-15*rnorm(length(t))
amp=1.5
s<-amp*sin(2*pi*f1*t)+amp*sin(2*pi*f2*t)
system.time(a<-kzp(s+noise,m=501,k=3))
b<-smooth.kzp(a, smooth_level=0.01)
par(mfrow=c(3,1))
plot(periodogram(s+noise),type='l')
plot(a)
plot(b)
par(mfrow=c(1,1))

# signal/noise
signal<-kzft(s+noise,m=501,k=3)
print(paste("signal-to-noise ratio = ", round(sqrt(var(2*Re(signal))/var(s+noise)),4) ))

summary(a, digits=2, top=2)
}

Run the code above in your browser using DataLab