cvwavelet              package:CVThresh              R Documentation

_W_a_v_e_l_e_t _r_e_c_o_n_s_t_r_u_c_t_i_o_n _b_y _l_e_v_e_l-_d_e_p_e_n_d_e_n_t _C_r_o_s_s-_V_a_l_i_d_a_t_i_o_n

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

     This function reconstructs the noise data by level-dependent
     cross-validation wavelet shrinkage.

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

     cvwavelet(y=y, ywd=ywd, cv.optlevel, cv.bsize=1, cv.kfold, 
         cv.random=TRUE, cv.tol=0.1^3, cv.maxiter=100,
         impute.vscale="independent", impute.tol=0.1^3, impute.maxiter=100,
         filter.number=10, family="DaubLeAsymm", thresh.type ="soft", ll=3)

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

       y: observation

     ywd: DWT object

cv.optlevel: thresholding levels

cv.bsize: block size of cross-validation

cv.kfold: the number of fold of cross-validation

cv.random: whether or not random cross-validation scheme should be
          used. Set cv.random=TRUE for random cross-validation scheme

  cv.tol: tolerance for cross-validation

cv.maxiter: maximum iteration for cross-validation

impute.vscale: specifies whether variance is adjusted level-by-level or
          not. ``level" or ``independent"

impute.tol: tolerance for imputation

impute.maxiter: maximum iteration for imputation

filter.number: specifies the smoothness of wavelet in the decomposition
          (argument of WaveThresh)

  family: specifies the family of wavelets ``DaubExPhase" or
          ``DaubLeAsymm" (argument of WaveThresh)

thresh.type: specifies the type of thresholding ``hard" or ``soft"
          (argument of WaveThresh)

      ll: specifies the lowest level to be thresholded

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

     This function performs level-dependent cross-validation wavelet
     shrinkage.

_V_a_l_u_e:

       y: observations

 yimpute: imputed values by provided cross-validation scheme

      yc: reconstruction by level-dependent cross-validation wavelet
          shrinkage

cvthresh: threshold values by level-dependent cross-validation

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

     'cvtype', 'cvimpute.by.wavelet', 'cvwavelet.after.impute'.

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

     data(ipd)
     y <- as.numeric(ipd); n <- length(y); nlevel <- log2(n)
     ywd <- wd(y)
     out <- cvwavelet(y=y, ywd=ywd, cv.optlevel=c(3:(nlevel-1)), 
                          cv.bsize=2, cv.kfold=4)

     ts.plot(ts(out$yc, start=1229.98, deltat=0.02, frequency=50),
        main="Level-dependent Cross Validation", xlab = "Seconds", ylab="")

