regarea               package:pastecs               R Documentation

_R_e_g_u_l_a_t_e _a _s_e_r_i_e_s _u_s_i_n_g _t_h_e _a_r_e_a _m_e_t_h_o_d

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

     Transform an irregular time series in a regular time series, or
     fill gaps in regular time series using the area method

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

     regarea(x, y=NULL, xmin=min(x), n=length(x),
             deltat=(max(x) - min(x))/(n - 1), rule=1,
             window=deltat, interp=FALSE, split=100)

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

       x: a vector with time in the irregular series. Missing values
          are allowed 

       y: a vector of same length as 'x' and holding observations at
          corresponding times 

    xmin: allows to respecify the origin of time in the calculated
          regular time series. By default, the origin is not redefined
          and it is equivalent to the smallest value in 'x' 

       n: the number of observations in the regular time series. By
          default, it is the same number than in the original irregular
          time series (i.e., 'length(x)' 

  deltat: the time interval between two observations in the regulated
          time series 

    rule: the rule to use for extrapolated values (outside of the range
          in the initial irregular time series) in the regular time
          series. With 'rule=1' (by default), these entries are not
          calculated and get 'NA'; with 'rule=2', these entries are
          extrapolated 

  window: size of the window to use for interpolation. By default,
          adjacent windows are used ('window=deltat') 

  interp: indicates if matching observations in both series must be
          calculated ('interp=TRUE'), or if initial observations are
          used "as is" in the final regular series ('interp=FALSE', by
          default) 

   split: a parameter to optimise calculation time and to avoid
          saturation of the memory. Very long time series are splitted
          into smaller subunits. This is transparent for the user. The
          default value of 'split=100' should be rarely changed. Give a
          lower value if the program fails and reports a memory problem
          during calculation 

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

     This is a linear interpolation method described by Fox (1972). It
     takes into account all observations located in a given time window
     around the missing observation. On the contrary to many other
     interpolations (constant, linear, spline), the interpolated curve
     does not pass by the initial observations. Indeed, a smoothing is
     also operated simultaneously by this method. The importance of the
     smoothing is dependent on the size of the window (the largest it
     is, the smoothest will be the calculated regular time series)

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

     An object of type 'regul' is returned. It has methods 'print()',
     'summary()', 'plot()', 'lines()', 'identify()', 'hist()',
     'extract()' and 'specs()'.

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

     Fox, W.T. & J.A. Brown, 1965. _The use of time-trend analysis for
     environmental interpretation of limestones._ J. Geol., 73:510-518.

     Ibanez, F., 1991. _Treatment of the data deriving from the COST
     647 project on coastal benthic ecology: The within-site 
     analysis._ In: B. Keegan (ed). Space and Time Series Data Analysis
     in Coastal Benthic Ecology. Pp 5-43.

     Ibanez, F. & J.C. Dauvin, 1988. _Long-term changes (1977-1987) on
     a muddy fine sand Abra alba - Melinna palmata population community
     from the Western English Channel._ J. Mar. Ecol. Prog. Ser.,
     49:65-81.

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

     'regul', 'regconst', 'reglin', 'regspline', 'regul.screen',
     'regul.adj', 'tseries', 'is.tseries'

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

     data(releve)
     # The 'Melosul' series is regulated with a 25-days window
     reg <- regarea(releve$Day, releve$Melosul, window=25)
     # Then with a 50-days window
     reg2 <- regarea(releve$Day, releve$Melosul, window=50)
     # The initial and both regulated series are shown on the graph for comparison
     plot(releve$Day, releve$Melosul, type="l")
     lines(reg$x, reg$y, col=2)
     lines(reg2$x, reg2$y, col=4)

