kzp                   package:kzft                   R Documentation

_K_o_l_m_o_g_o_r_o_v-_Z_u_r_b_e_n_k_o _p_e_r_i_o_d_o_g_r_a_m _a_n_d _s_m_o_o_t_h_i_n_g _m_e_t_h_o_d_s

_D_e_s_c_r_i_p_t_i_o_n:

     Kolmogorov-Zurbenko periodogram and smoothing using either DZ or
     NZ method.

_U_s_a_g_e:

     kzp(x, m, k, p=1, n=1)
     nonlinearity.kzp(pg, K=length(pg))
     variation.kzp(pg, K=length(pg))
     smooth.kzp(pg,c,K=length(pg),method = "DZ")

_A_r_g_u_m_e_n_t_s:

       x: A vector of the time series

       m: Length of the window size of the KZFT

       k: Number of iterations of the KZFT

       p: Percentage of overlap between two intervals

       n: Multiple frequency rate of Fourier frequencies

      pg: The periodogram of the time series

       K: Half of the maximum bandwidth of the spectral window

       c: A prespecified percentage of total nonlinearity/variation

  method: Smooth methods: DZ or NZ

_D_e_t_a_i_l_s:

     Kolmogorov-Zurbenko periodogram is calculated based on the
     Kolmogorov-Zurbenko Fourier transform. Both DiRienzo-Zurbenko
     smoothing and Neagu-Zurbenko smoothing methods are adaptive which
     allow the bandwidth of the spectral window in the smoothed
     periodogram vary according to the smoothness of the underlying
     spectral density. In DiRienzo-Zurbenko method, the bandwith is
     extended until the squared variation of the periodogram within the
     window reaches a prespecified percentage of total variation. In
     Neagu-Zurbenko method, the bandwith is extended until the measure
     of nonlinearity of the periodogram within the window reaches a
     prespecified percentage of the total measure of nonlinearity.

_R_e_f_e_r_e_n_c_e_s:

     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.

_S_e_e _A_l_s_o:

     'kzft', 'kztp', 'kzw'.

_E_x_a_m_p_l_e_s:

     #example 1
     #show the effect of smoothing methods

     N<-480
     x<-rep(0,N)

     x[1:4]<-rnorm(4)

     for ( t in 5:N ) 
     { 
     x[t]<-2.76*x[t-1]-3.81*x[t-2]+2.65*x[t-3]-0.92*x[t-4]+rnorm(1)
     }

     for ( t in 1:N ) 
     {
     x[t]<-50*cos( 2*pi*(10/N)*t)+40*cos( 2*pi*(20/N)*t )+x[t]
     }

     kzp.x<-log(kzp(x,480,1))
     spg.x1<-smooth.kzp(kzp.x,0.03, method="DZ")$periodogram
     spg.x2<-smooth.kzp(kzp.x,0.03, method="NZ")$periodogram

     omega<-seq(0,1,length=481)[2:241]

     par(mfrow=c(2,2))
     plot(omega,kzp.x,main="Periodogram",type="l")
     plot(omega,spg.x1,main="Smoothed Periodogram using DZ method",type="l")
     plot(omega,spg.x2,main="Smoothed Periodogram using NZ method",type="l")

     #example 2
     #show the effect of KZFT
     t<-1:2000
     y<-1.1*sin(2*pi*0.0339*t)+7*sin(2*pi*0.0366*t)+2*rnorm(1000,0,1)
     kzp.y1<-log(kzp(y,1000,1,0.1,1))
     kzp.y2<-log(kzp(y,500,2,0.1,2))

     spg.y1<-smooth.kzp(kzp.y1,0.01, method="NZ")$periodogram
     spg.y2<-smooth.kzp(kzp.y2,0.01, method="NZ")$periodogram

     omega<-seq(0,1,length=1001)[21:61]
     par(mfrow=c(2,2))
     plot(omega,kzp.y1[20:60], main="Periodogram m=1000, k=1", type="l")
     plot(omega,kzp.y2[20:60], main="Periodogram m=500, k=2", type="l")
     plot(omega,spg.y1[20:60], main="Smoothed Periodogram m=1000, k=1", type="l")
     plot(omega,spg.y2[20:60], main="Smoothed Periodogram m=500, k=2", type="l")

