amif                 package:tseries                 R Documentation

_A_u_t_o _M_u_t_u_a_l _I_n_f_o_r_m_a_t_i_o_n _F_u_n_c_t_i_o_n

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

     Computes and plots the sample (normalized) auto mutual information
     function of `x' up to lag `lag.max'.

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

     amif (x, lag.max = NULL, maxbit = 20, confidence = 0.2, ci = 0.95, nsurr = 20, 
           fft = FALSE, amplitude = FALSE, normalized = TRUE, trace = FALSE,
           plot = TRUE, ...)
     plot (object, ci.col = "blue", ylab = "AMIF", ...)

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

       x: a numeric vector or time series.

 lag.max: a scalar lag parameter.

  maxbit: the maximum resolution in bit to which the precision of the
          data will be limited; also limits the maximum partition
          depth. It  cannot exceed an overall maximum of 25 bit.

confidence: the confidence level for the chi-square-test  which tests
          the point distribution in substructures of the probability
          area upon uniformity. A substructure is assumed if the
          deviation from a uniform point distribution occurs with a
          probability less than the significance niveau. Possible
          settings are: 0.01, 0.02, 0.05, 0.1, 0.2, ..., 0.9, 0.95,
          0.98, 0.99.

      ci: coverage probability for confidence bound. Plotting of the
          confidence bound is suppressed if `ci' is zero or negative.

   nsurr: the number of surrogate samples to compute the confidence
          bound. To obtain "good" confidence bounds, set `nsurr' to at
          least a value of `500'.

     fft: a logical indicating whether phase randomized surrogate data
          is generated.

amplitude: a logical indicating whether amplitude-adjusted surrogate
          data is computed.

normalized: a logical indicating whether the normalized auto  mutual
          information function is computed.

   trace: a logical indicating whether additional output from the
          computation is traced.

    plot: a logical indicating whether the AMIF is plotted.

  object: an object of class `"amif"'.

  ci.col: color to plot the confidence bound.

    ylab: the title for the y axis.

     ...: either additional arguments to `plot.amif' (`amif'), or
          additional arguments to `plot.acf' (`plot.amif').

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

     If `plot' is `TRUE', then the AMIF is plotted. Further, the
     confidence bound for the null of surrogate data is computed by
     Monte-Carlo simulation percentiles and plotted. If any temporal
     dependence is under question, then the null is an i.i.d. series
     and scrambled surrogates can be used (the default). In the case of
     testing non-linearity against linearity, setting the switch `fft'
     is appropriate. It generates surrogates with the same spectrum as
     `x'. If the switch `amplitude' is set in addition, then surrogates
     `xs' with the following properties are used: First, `xs' has the
     same histogram as `x'. Second, `G(xs)' has the  same Fourier
     spectra as `G(x)', where `G(.)' is the transformation from the
     histogram of `x' to a Gaussian distribution.

     The simulations are computed with the actual values of  `maxbit'
     and `confidence'.

     Missing values are not allowed.

     To compute the mutual information between two random variables, an
     implementation of the algorithm of Fraser and Swinney (1986) is
     used.

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

     An object of class `c("amif","acf")'.

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

     Fraser and Swinney (1986) algorithm:  The group of F. W. Schneider
     at the University of Wuerzburg, Germany: Authors T. M. Kruel,
     Institut fuer Physikalische Chemie, University of Wuerzburg,
     Germany, and K. Krischer,  Fritz-Haber-Institut der
     Max-Planck-Gesellschaft, Berlin, Germany.

     Port to R, implementation of AMIF, and scramble device: A.
     Trapletti.

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

     C. Granger and J. L. Lin (1994): Using the Mutual Information
     Coefficient to Identify Lags in Non-Linear Models. Journal of Time
     Series Analysis 15, pp. 371-384.

     A. M. Fraser and H. L. Swinney (1986): Independent Coordinates for
     Strange Attractors from Mutual Information. Physical Review A 33,
     pp. 1134-1140.

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

     `acf', `surrogate'

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

     n <- 1000  # Length of simulated time series

     e <- rnorm (n)  # Generate ARCH(1) process
     x <- double (n)
     x[1] <- rnorm (1)
     for (i in 2:n)
     {
       x[i] <- e[i]*sqrt(0.1+0.4*x[i-1]^2)
     }
     x <- ts(x)
     plot (x)

     # Each test takes about 3 sec on a Pentium II 300MHz

     amif (x, lag.max=5)  # i.i.d. vs. any dependence 
     amif (x, lag.max=5, fft=TRUE)  # linear vs. non-linear 
     amif (x, lag.max=5, fft=TRUE, amplitude=TRUE)

     e <- rnorm (n)  # Generate AR(1) process
     x <- double (n)
     x[1] <- rnorm (1)
     for (i in 2:n)
     {
       x[i] <- 0.4*x[i-1]+e[i]
     }
     x <- ts(x)
     plot (x)

     amif (x, lag.max=5)  # i.i.d. vs. any dependence 
     amif (x, lag.max=5, fft=TRUE)  # linear vs. non-linear 
     amif (x, lag.max=5, fft=TRUE, amplitude=TRUE)

