compana              package:adehabitat              R Documentation

_C_o_m_p_o_s_i_t_i_o_n_a_l _A_n_a_l_y_s_i_s _o_f _H_a_b_i_t_a_t _U_s_e

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

     'compana' performs a classical compositional analysis of habitat
     use (Aebischer et al., 1993).

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

     compana(used, avail, test = c("randomisation", "parametric"),
             rnv = 0.01, nrep = 500, alpha = 0.1)

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

    used: a matrix or a data frame giving the percentage of use of
          habitats (in columns) by animals (in rows). 

   avail: a matrix or a data frame describing the percentage of
          availability of habitats (in columns) by animals (in rows). 

    test: a character string.  If '"randomisation"', randomisation
          tests are performed for both the  habitat ranking and the
          test of habitat selection. If '"parametric"', usual
          parametric tests are performed (chi-square for the test of
          habitat selection and t-tests for habitat ranking).

     rnv: the number replacing the 0 values occurring in the matrix
          'used'. 

    nrep: the number of repetitions in the randomisation tests. 

   alpha: the alpha level for the tests. 

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

     The compositional analysis of habitat use has been recommended by
     Aebischer et al. (1993) for the analysis of habitat selection by
     several animals, when the resources are defined by several
     categories (e.g. vegetation types).
      This analysis is carried out in two steps: first the significance
     of habitat selection is tested (using a Wilks lambda). Then, a
     ranking matrix is built, indicating whether the habitat type in
     row is significantly used more or less than the habitat type in
     column. When this analysis is performed on radio-tracking data,
     Aebischer et al. recommend to study habitat selection at two
     scales: (i) selection of the home range within the study area, and
     (ii) selection of the relocations within the home range.  The
     first scale is termed second-order habitat selection by Johnson
     (1980), and the second, third-order habitat selection.

     When zero values are found in the matrix of used habitats, they
     are replaced by a small value (by default, 0.01), according to the
     recommendations of Aebischer et al. (1993).

     When zero values are found in the matrix of available habitats,
     the function 'compana' uses the procedure termed "weighted mean
     lambda" described in Aebischer et al. (1993: Appendix 2), instead
     of the usual lambda (see examples). Zero values can be found in
     the matrix of available habitats when the third-order habitat
     selection is under focus. In this case, it may occur that some
     habitat types are available to some animals and not to the others.

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

     Returns a list of the class 'compana': 

    used: the matrix of used habitats

   avail: the matrix of available habitats

type.test: a character string.  Either '"randomisation"' or
          '"parametric"'

    test: the results of the test of habitat selection

      rm: the ranking matrix: a square matrix with 'nh' rows and 'nh'
          columns, where 'nh' is the number of habitat types under
          study.  At the intersection of the row 'i' and of the column
          'j', there is a '"+"' when the habitat 'i' is more used than
          the habitat in column, and '"-"' otherwise. When the
          difference is significant, the sign is tripled.

    rmnb: the matrix containing the number of animals used to perform
          the tests in 'rm'.

    rank: the rank of the habitat types.  It is equal to the number of
          '"+"' for each habitat type in row of 'rm'.

     rmv: the matrix of statistics used to build 'rm'. if '(test =
          "parametric")', the matrix contains the values of 't', in the
          t-test comparing the row and the column habitat.  if '(test =
          "randomisation")', the matrix contains the mean difference
          between the used and available log-ratios (see Aebischer et
          al., 1993).

 profile: The profile of preferences: resource types are sorted so that
          the left type is the most preferred and the right type is the
          most avoided.  Habitats for which the intensity of habitat
          selection is similar (no significant difference) are
          connected by a line.

_N_o_t_e:

     In the examples below, the results differ from those published in
     Aebischer et al. (squirrel example, selection of the relocations
     within the home range). In fact, there has been a confusion in the
     column names in the paper. Actually, Aebischer (pers. com.)
     indicated that the ranking matrix given in this example is
     correct.

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

     Clment Calenge calenge@biomserv.univ-lyon1.fr

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

     Aebischer, N. J. and Robertson, P. A. (1992) Practical aspects of
     compositional analysis as applied to pheasant habitat utilisation.
     pp. 285-293 In: Priede, G. and Swift, S. M. _Wildlife telemetry,
     remote monitoring and tracking of animals_. 

     Aebischer, N. J., Robertson, P. A. and Kenward, R. E. (1993)
     Compositional analysis of habitat use from animal radiotracking
     data. _Ecology_, *74*, 1313-1325.

     Johnson, D. H. (1980) The comparison of usage and availability
     measurements for evaluating resource preference. _Ecology_, *61*,
     65-71.

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

     'wiII' and 'wiIII' for other analyses of habitat selection  with
     this kind of data.

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

     ## The examples presented here
     ## are the same as those presented in
     ## the paper of Aebischer et al. (1993)

     #############################
     ## Pheasant dataset: first
     ## example in Aebischer et al.

     data(pheasant)

     ## Second order habitat selection
     ## Selection of home range within the
     ## study area (example of parametric test)
     pheana2 <- compana(pheasant$mcp, pheasant$studyarea,
                        test = "parametric")
     pheana2

     ## The ranking matrix:
     print(pheana2$rm, quote = FALSE)

     ## Third order habitat selection
     ## (relocation within home range)
     ## We remove the first pheasant of the analysis
     ## (as in the paper of Aebischer et al.)
     ## before the analysis
     pheana3 <- compana(pheasant$locs[-1,], pheasant$mcp[-1,c(1,2,4)])
     pheana3

     ## The ranking matrix:
     print(pheana3$rm, quote = FALSE)


     #############################
     ## Squirrel data set: second
     ## example in Aebischer et al.

     data(squirrel)

     ## Second order habitat selection
     ## Selection of home range within the
     ## study area
     squiana2 <- compana(squirrel$mcp, squirrel$studyarea)
     squiana2

     ## The ranking matrix:
     print(squiana2$rm, quote = FALSE)

     ## Third order habitat selection
     ## (relocation within home range)
     ## We remove the second column
     ## (as in the paper of Aebischer et al.)
     squiana3 <- compana(squirrel$locs[,-2], squirrel$mcp[,-2])
     squiana3

     ## The ranking matrix:
     print(squiana3$rm, quote = FALSE)

