kzsv                   package:kza                   R Documentation

_K_o_l_m_o_g_o_r_o_v-_Z_u_r_b_e_n_k_o _A_d_a_p_t_i_v_e _f_i_l_t_e_r _w_i_t_h _S_a_m_p_l_e _V_a_r_i_a_n_c_e.

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

     Sample variance of a Kolmogorov-Zurbenko adaptive filter.

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

     kzsv(y=NULL, kza=NULL, kz=NULL, q, k=3, m=0, tol=1.0e-5)

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

       y: The raw data to be analyzed.

     kza: A vector of the resultant time series from kza function.

      kz: A moving average result from the kz function.

       q: The half length of the window size for the filter.

       k: The number of iterations to run kz and kza functions.

       m: Minimum size of filtering window.

     tol: The smallest value to accept as nonzero.

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

     x <- c(rep(0,1000),rep(0.5,1000),rep(0,1000))
     v <- x + rnorm(n = 3000, sd = 1.0)    # normally-distributed random variates
     z <- kza(v,q=200,m=10)
     par(mfrow=c(3,1))
     plot(v,type="l")
     plot(z,type="l")

     s <- kzsv(y=z,kza=z,q=200)
     plot(s/mean(s),type="l")

