decloess               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 _b_y _t_h_e _L_O_E_S_S _m_e_t_h_o_d

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

     Compute a seasonal decomposition of a regular time series using a
     LOESS method (local polynomial regression)

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

     decloess(x, type="additive", s.window=NULL, s.degree=0, t.window=NULL,
             t.degree=2, robust=FALSE, trend=FALSE)

_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. This is for compatibility purpose. The
          only model type that is accepted for this method is
          `type="additive"'. For a multiplicative model, use
          `deccensus()' instead 

s.window: the width of the window used to extract the seasonal
          component. Use an odd value equal or just larger than the
          number of annual values (frequency of the time series). Use
          another value to extract other cycles (circadian, lunar,...).
          Using `s.window="periodic"' ensures a correct value for
          extracting a seasonal component when the time scale is in
          years units 

s.degree: the order of the polynome to use to extract the seasonal
          component (0 or 1). By default `s.degree=0' 

t.window: the width of the window to use to extract the general trend
          when `trend=TRUE' (indicate an odd value). If this parameter
          is not provided, a reasonable value is first calculated, and
          then used by the algorithm. 

t.degree: the order of the polynome to use to extract the general trend
          (0, 1 or 2). By default `t.degree=2' 

  robust: if `TRUE' a robust regression method is used. Otherwise
          (`FALSE'), by default, a classical least-square regression is
          used 

   trend: If `TRUE' a trend is calculated (under R only). Otherwise,
          the series is decomposed into a seasonal component and
          residuals only 

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

     This function uses the `stl()' function for the decomposition. It
     is a wrapper that create a 'tsd' object

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

     a 'tsd' object

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

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

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

     Cleveland, W.S., E. Grosse & W.M. Shyu, 1992. Local regression
     models. Chapter 8 of Statistical Models in S. J.M. Chambers & T.J.
     Hastie (eds). Wadsworth & Brook/Cole.

     Cleveland, R.B.,  W.S. Cleveland, J.E. McRae, & I. Terpenning,
     1990. STL: A seasonal-trend  decomposition  procedure based on
     loess. J. Official Stat., 6:3-73.

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

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

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

     data(releve)
     melo.regy <- regul(releve$Day, releve$Melosul, xmin=9, n=87,
             units="daystoyears", frequency=24, tol=2.2, methods="linear",
             datemin="21/03/1989", dateformat="d/m/Y")
     melo.ts <- tseries(melo.regy)
     melo.dec <- decloess(melo.ts, s.window="periodic")
     plot(melo.dec, col=1:3)

