AutoD2                package:pastecs                R Documentation

_A_u_t_o_D_2, _C_r_o_s_s_D_2 _o_r _C_e_n_t_e_r_D_2 _a_n_a_l_y_s_i_s _o_f _a _m_u_l_t_i_p_l_e _t_i_m_e-_s_e_r_i_e_s

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

     Compute and plot multiple autocorrelation using Mahalanobis
     generalized distance D2. AutoD2 uses the same multiple
     time-series. CrossD2 compares two sets of multiple time-series
     having same size (same number of descriptors). CenterD2 compares
     subsamples issued from a single multivariate time-series, aiming
     to detect discontinuities.

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

     AutoD2(series, lags=c(1, nrow(series)/3), step=1, plotit=TRUE,
             add=FALSE, ...)
     CrossD2(series, series2, lags=c(1, nrow(series)/3), step=1,
             plotit=TRUE, add=FALSE, ...)
     CenterD2(series, window=nrow(series)/5, plotit=TRUE, add=FALSE,
             type="l", level=0.05, lhorz=TRUE, lcol=2, llty=2, ...)

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

  series: regularized multiple time-series 

 series2: a second set of regularized multiple time-series 

    lags: minimal and maximal lag to use. By default, 1 and a third of
          the number of observations in the series respectively 

    step: step between successive lags. By default, 1 

  window: the window to use for CenterD2. By default, a fifth of the
          total number of observations in the series 

  plotit: if 'TRUE' then also plot the graph 

     add: if 'TRUE' then the graph is added to the current figure 

    type: The type of line to draw in the CenterD2 graph. By default, a
          line without points 

   level: The significance level to consider in the CenterD2 analysis.
          By default 5% 

   lhorz: Do we have to plot also the horizontal line representing the
          significance level on the graph? 

    lcol: The color of the significance level line. By default, color 2
          is used 

    llty: The style for the significance level line. By default:
          'llty=2', a dashed line is drawn

     ...: additional graph parameters 

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

     An object of class 'D2' which contains: 

    lag : The vector of lags

     D2 : The D2 value for this lag

   call : The command invoked when this function was called

   data : The series used

   type : The type of 'D2' analysis: 'AutoD2', 'CrossD2' or 'CenterD2'

 window : The size of the window used in the CenterD2 analysis

  level : The significance level for CenterD2

  chisq : The chi-square value corresponding to the significance level
          in the CenterD2 analysis

units.text : Time units of the series, nicely formatted for graphs

_W_A_R_N_I_N_G:

     If data are too heterogeneous, results could be biased (a
     singularity matrix appears in the calculations).

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

     Cooley, W.W. & P.R. Lohnes, 1962. _Multivariate procedures for the
     behavioural sciences._ Whiley & sons.

     Dagnlie, P., 1975. _Analyse statistique  plusieurs variables._
     Presses Agronomiques de Gembloux.

     Ibanez, F., 1975. _Contribution  l'analyse mathmatique des
     vnements en cologie planctonique: optimisations
     mthodologiques; tude exprimentale en continu  petite chelle
     du plancton ctier._ Thse d'tat, Paris VI.

     Ibanez, F., 1976. _Contribution  l'analyse mathmatique des
     vnements en cologie planctonique. Optimisations
     mthodologiques._ Bull. Inst. Ocanogr. Monaco, 72:1-96.

     Ibanez, F., 1981. _Immediate detection of heterogeneities in
     continuous multivariate oceanographic recordings. Application to
     time series analysis of changes in the bay of Villefranche sur
     mer._ Limnol. Oceanogr., 26:336-349.

     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_, p 5-43.

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

     'mahalanobis', 'acf'

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

     data(marphy)
     marphy.ts <- as.ts(as.matrix(marphy[, 1:3]))
     AutoD2(marphy.ts)
     marphy.ts2 <- as.ts(as.matrix(marphy[, c(1, 4, 3)]))
     CrossD2(marphy.ts, marphy.ts2)
     # This is not identical to:
     CrossD2(marphy.ts2, marphy.ts)
     marphy.d2 <- CenterD2(marphy.ts, window=16)
     lines(c(17, 17), c(-1, 15), col=4, lty=2)
     lines(c(25, 25), c(-1, 15), col=4, lty=2)
     lines(c(30, 30), c(-1, 15), col=4, lty=2)
     lines(c(41, 41), c(-1, 15), col=4, lty=2)
     lines(c(46, 46), c(-1, 15), col=4, lty=2)
     text(c(8.5, 21, 27.5, 35, 43.5, 57), 11, labels=c("Peripheral Zone", "D1",
             "C", "Front", "D2", "Central Zone")) # Labels
     time(marphy.ts)[marphy.d2$D2 > marphy.d2$chisq]

