mantel                 package:vegan                 R Documentation

_M_a_n_t_e_l _a_n_d _P_a_r_t_i_a_l _M_a_n_t_e_l _T_e_s_t_s _f_o_r _D_i_s_s_i_m_i_l_a_r_i_t_y _M_a_t_r_i_c_e_s

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

     Function 'mantel'  finds the Mantel statistic as a matrix
     correlation between two dissimilarity matrices, and function
     'mantel.partial' finds the partial Mantel statistic as the partial
     matrix correlation between three dissimilarity matricies.  The
     significance of the statistic is evaluated by permuting rows and
     columns of the first dissimilarity matrix.

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

     mantel(xdis, ydis, method="pearson", permutations=1000, strata)
     mantel.partial(xdis, ydis, zdis, method = "pearson", permutations = 1000, 
         strata)

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

xdis, ydis, zdis: Dissimilarity matrices or a 'dist' objects. 

  method: Correlation method, as accepted by 'cor': '"pearson"',
          '"spearman"' or '"kendall"'. 

permutations: Number of permutations in assessing significance. 

  strata: An integer vector or factor specifying the strata for
          permutation. If supplied, observations are permuted only
          within the specified strata.

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

     Mantel statistic is simply a correlation between entries of two
     dissimilarity matrices (some use cross products, but these are
     linearly related).  However, the significance cannot be directly
     assessed, because there are N(N-1)/2 entries for just N
     observations. Mantel developed asymptotic test, but here we use
     permutations of N rows and columns of dissimilarity matrix.

     Partial Mantel statistic uses partial correlation conditioned on
     the third matrix. Only the first matrix is permuted so that the
     correlation structure between second and first matrices is kept
     constant. Although 'mantel.partial' silently accepts other methods
     than '"pearson"', partial correlations will probably be wrong with
     other methods.

     The function uses 'cor', which should accept alternatives
     'pearson' for product moment correlations and 'spearman' or
     'kendall' for rank correlations.

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

     The function returns a list of class 'mantel' with following
     components:  

   Call : Function call.

 method : Correlation method used, as returned by 'cor.test'.

statistic: The Mantel statistic.

  signif: Empirical significance level from permutations.

    perm: A vector of permuted values.

permutations: Number of permutations.

_N_o_t_e:

     Legendre & Legendre (1998) say that partial Mantel correlations 
     often are difficult to interpet.

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

     Jari Oksanen

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

     The test is due to Mantel, of course, but the current
     implementation is based on Legendre and Legendre.

     Legendre, P. and Legendre, L. (1998) _Numerical Ecology_. 2nd
     English Edition. Elsevier.

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

     'cor' for correlation coefficients, 'protest' (``Procrustes
     test'') for an alternative with ordination diagrams, and 'anosim'
     for comparing dissimilarities against classification.  For
     dissimilarity matrices, see 'vegdist' or 'dist'.  See 'bioenv' for
     selecting environmental variables.

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

     ## Is vegetation related to environment?
     data(varespec)
     data(varechem)
     veg.dist <- vegdist(varespec) # Bray-Curtis
     env.dist <- vegdist(scale(varechem), "euclid")
     mantel(veg.dist, env.dist)
     mantel(veg.dist, env.dist, method="spear")

