gearymoran               package:ade4               R Documentation

_M_o_r_a_n'_s _I _a_n_d _G_e_a_r_y'_c _r_a_n_d_o_m_i_z_a_t_i_o_n _t_e_s_t_s _f_o_r _s_p_a_t_i_a_l _a_n_d _p_h_y_l_o_g_e_n_e_t_i_c _a_u_t_o_c_o_r_r_e_l_a_t_i_o_n

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

     This function performs Moran's I test using phylogenetic and
     spatial link matrix (binary or general). It uses neighbouring
     weights so Moran's I and Geary's c randomization tests are
     equivalent.

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

     gearymoran(bilis, X, nrepet = 999)

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

   bilis: : a _n_ by _n_ link matrix where _n_ is the row number of X

       X: : a data frame with continuous variables

  nrepet: : number of random vectors for the randomization test

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

     'bilis' is a squared symmetric matrix which terms are all positive
     or null. 

     'bilis' is firstly transformed in frequency matrix A by dividing
     it by the total sum of data matrix :  

               a_ij = bilis_ij / (sum_i sum_j bilis_ij)

     .  The neighbouring weights is defined by the matrix D =
     diag(d_1,d_2, ...) where d_i = sum_j bilis_ij. For each vector x
     of the data frame X, the test is based on the Moran statistic
     t(x)Ax where x is D-centred.

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

     Returns an object of class 'krandtest' (randomization tests).

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

     Sbastien Ollier ollier@biomserv.univ-lyon1.fr 
      Daniel Chessel chessel@biomserv.univ-lyon1.fr

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

     Cliff, A. D. and Ord, J. K. (1973) _Spatial autocorrelation_,
     Pion, London.

     Thioulouse, J., Chessel, D. and Champely, S. (1995) Multivariate
     analysis of spatial patterns: a unified approach to local and
     global structures.  _Environmental and Ecological Statistics_,
     *2*, 1-14.

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

     'moran.test' and 'geary.test' for classical versions of Moran'I
     test and Geary'c one

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

     # a spatial example
     data(mafragh)
     tab0 <- (as.data.frame(scalewt(mafragh$mil)))
     bilis0 <- neig2mat(mafragh$neig)
     gm0 <- gearymoran(bilis0, tab0, 999)
     gm0
     plot(gm0, nclass = 20)

     ## Not run: 
     # a phylogenetic example
     data(mjrochet)
     mjr.phy <- newick2phylog(mjrochet$tre)
     mjr.tab <- log(mjrochet$tab)
     gearymoran(mjr.phy$Amat, mjr.tab)
     gearymoran(mjr.phy$Wmat, mjr.tab)
     par(mfrow = c(1,2))
     table.value(mjr.phy$Wmat, csi = 0.25, clabel.r = 0)
     table.value(mjr.phy$Amat, csi = 0.35, clabel.r = 0)
     par(mfrow = c(1,1))
     ## End(Not run)

