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(v, q, f)

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

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

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

       f: adaptive filter derived from kzf function.

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

     x <- c(rep(0,1000),rep(0.5,1000),rep(0,1000))
     set.seed(1)

     v <- x + rnorm(n = 3000, sd = 1.0)    # normally-distributed random variates

     z <- kza(v,100,3)
     z <- z[[1]]

     # determine adaptive filter
     d <- rep(0,3000)
     f <- kzf(v,100,d)
     f <- f[[4]]

     # plot of sample variance
     s <- kzsv(z,100,f)
     plot(s[[1]],type="l")

