decdiff               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 _d_i_f_f_e_r_e_n_c_e_s (_t_r_e_n_d _e_l_i_m_i_n_a_t_i_o_n)

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

     A filtering using X(t+lag) - X(t) has the property to eliminate
     the general trend from the series, whatever its shape

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

     decdiff(x, type="additive", lag=1, order=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"' 

     lag: The lag between the two observations used to calculate
          differences. By default, `lag=1' 

   order: The order of the difference corresponds to the number of
          times it is applied, by default `order=1' 

    ends: either "NAs" (fill first values that are not calculable with
          NAs), or "fill" (fill them with the average of following
          observations before applying the filter, by default), or
          "drop" (do not fill them). If `ends="drop"', the filtered
          series will be shorter than the initial one by lag*order. In
          all other cases, the filtered series is as large as the
          initial one 

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

     This function is a wrapper around the `diff()' function to create
     a 'tsd' object. It also manages initial values through the `ends'
     argument.

_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:

     Kendall, M., 1976. Time-series. Charles Griffin & Co Ltd. 197 pp.

     Laloire, J.C., 1972. Mthodes du traitement des chroniques. Dunod,
     Paris, 194 pp.

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

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

     `tsd', `tseries', `decaverage', `deccensus', `decmedian', 
     `decevf', `decreg', `decloess'

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

     data(marbio)
     ClausoB.ts <- ts(log(marbio$ClausocalanusB + 1))
     ClausoB.dec <- decdiff(ClausoB.ts, lag=1, order=2, ends="fill")
     plot(ClausoB.dec, col=c(1, 4, 2), xlab="stations")

