decmedian              package:pastecs              R Documentation

_T_i_m_e _s_e_r_i_e_s _d_e_c_o_m_p_o_s_i_t_i_o_n _u_s_i_n_g _a _r_u_n_n_i_n_g _m_e_d_i_a_n

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

     This is a nonlinear filtering method used to smooth, but also to
     segment a time series. The isolated peaks and pits are leveraged
     by this method.

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

     decmedian(x, type="additive", order=1, times=1, ends="fill")

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

       x: a regular time series ('rts' under S+ and 'ts' under R) 

    type: the type of model, either 'type="additive"' (by default), or
          'type="multiplicative"' 

   order: the window used for the running median corresponds to 2*order
          + 1  

   times: the number of times the running median is applied. By
          default, 1 

    ends: the method used to calculate ends. Either "NAs" (fill
          extremes, non-calculable values with NAs), or "fill" (fill
          these extremes with the closest calculable median) 

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

     a 'tsd' object

_A_u_t_h_o_r(_s):

     Frdric Ibanez (ibanez@obs-vlfr.fr), Philippe Grosjean
     (phgrosjean@sciviews.org)

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

     Gebski, V.J., 1985. _Some properties of splicing when applied to
     non-linear smoothers._ Comp. Stat. Data Anal., 3:151-157.

     Philips, L. & R. Blomme, 1973. _Analyse chronologique. Universit
     Catholique de Louvain._ Vander ed. 339 pp.

     Tukey, J.W., 1977. _Exploratory Data Analysis._ Reading
     Massachusetts: Addison-Wesley.

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

     'tsd', 'tseries', 'decaverage', 'deccensus', 'decdiff', 'decevf',
     'decreg', 'decloess'

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

     data(marbio)
     ClausoB.ts <- ts(log(marbio$ClausocalanusB + 1))
     ClausoB.dec <- decmedian(ClausoB.ts, order=2, times=10, ends="fill")
     plot(ClausoB.dec, col=c(1, 4, 2), xlab="stations")
     # This is a transect across a frontal zone:
     plot(ClausoB.dec, col=c(0, 2), xlab="stations", stack=FALSE, resid=FALSE)
     lines(c(17, 17), c(0, 10), col=4, lty=2)
     lines(c(25, 25), c(0, 10), col=4, lty=2)
     lines(c(30, 30), c(0, 10), col=4, lty=2)
     lines(c(41, 41), c(0, 10), col=4, lty=2)
     lines(c(46, 46), c(0, 10), col=4, lty=2)
     text(c(8.5, 21, 27.5, 35, 43.5, 57), 8.7, labels=c("Peripheral Zone", "D1",
             "C", "Front", "D2", "Central Zone"))

