wascores                package:vegan                R Documentation

_W_e_i_g_h_t_e_d _A_v_e_r_a_g_e_s _S_c_o_r_e_s _f_o_r _S_p_e_c_i_e_s

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

     Computes Weighted Averages scores of species for ordination
     configuration or for environmental variables.

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

     wascores(x, w, expand=FALSE)
     eigengrad(x, w)

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

       x: Environmental variables or ordination scores.

       w: Weights: species abundances.

  expand: Expand weighted averages so that they have the same weighted
          variance as the corresponding environmental variables.  

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

     Function 'wascores' computes weighted averages. Weighted averages
     `shrink': they cannot be more extreme than values used for
     calculating the averages. With 'expand = TRUE', the function
     `dehsrinks' the weighted averages by making their biased weighted
     variance equal to the biased weighted variance of the
     corresponding environmental variable.  Function 'eigengrad'
     returns the inverses of squared expansion factors or the attribute
     'shrinkage' of the 'wascores' result for each environmental
     gradient.  This is equal to the constrained eigenvalue of 'cca'
     when only this one gradient was used as a constraint, and
     describes the strength of the gradient.

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

     Function 'wascores' returns a matrix where species define rows and
     ordination axes or environmental variables define columns. If
     'expand = TRUE', attribute 'shrinkage' has the inverses of squared
     expansion factors or 'cca' eigenvalues for the variable.  Function
     'eigengrad' returns only the 'shrinkage' attribute.

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

     Jari Oksanen

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

     'isoMDS', 'cca'.

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

     data(varespec)
     data(varechem)
     library(MASS)  ## isoMDS
     vare.dist <- vegdist(wisconsin(varespec))
     vare.mds <- isoMDS(vare.dist)
     vare.points <- postMDS(vare.mds$points, vare.dist)
     vare.wa <- wascores(vare.points, varespec)
     plot(scores(vare.points), pch="+", asp=1)
     text(vare.wa, rownames(vare.wa), cex=0.8, col="blue")
     ## Omit rare species (frequency <= 4)
     freq <- apply(varespec>0, 2, sum)
     plot(scores(vare.points), pch="+", asp=1)
     text(vare.wa[freq > 4,], rownames(vare.wa)[freq > 4],cex=0.8,col="blue")
     ## Works for environmental variables, too.
     wascores(varechem, varespec)
     ## And the strengths of these variables are:
     eigengrad(varechem, varespec)

