compana {adehabitat} | R Documentation

## Compositional Analysis of Habitat Use

### Description

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

### Usage

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

### Arguments

`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.

### Details

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.

### Value

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.

### Note

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.

### Author(s)

Clément Calenge calenge@biomserv.univ-lyon1.fr

### References

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.

### See Also

`wiII` and `wiIII` for computation of selection ratios, and `eisera` to perform an eigenanalysis of selection ratios.

### Examples

    ## 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)

[Package adehabitat version 1.4 Index]