wi  R Documentation 
These functions compute the resource selection ratios (wi) for design I, II and III data types, with resources defined by several categories. Basic tests are also provided.
widesI(u, a, avknown = TRUE, alpha = 0.05)
widesII(u, a, avknown = TRUE, alpha = 0.05)
widesIII(u, a, avknown = TRUE, alpha = 0.05)
## S3 method for class 'wiI'
print(x, ...)
## S3 method for class 'wiII'
print(x, ...)
## S3 method for class 'wiIII'
print(x, ...)
## S3 method for class 'wi'
plot(x, caxis = 0.7, clab = 1, ylog = FALSE, errbar = c("CI", "SE"),
main = "Manly selectivity measure", noorder = TRUE, ...)
u 
for 
a 
for 
avknown 
logical. 
alpha 
the threshold value for the tests and confidence intervals 
x 
an object of class 
caxis 
character size on axes to be passed to

clab 
character size of axes labels to be passed to

ylog 
logical. If 
errbar 
a character string. Type of error bars: either 
main 
a character string. The title of the graph 
noorder 
logical. If 
... 
additionnal arguments to be passed to the function

widesI
may be used to explore resource selection by
animals, when designs I are involved (habitat use and availability are
measured at the population level  animals are not identified). The
function tests habitat selection with the Khi2 of Pearson
and loglikelihood Khi2 (recommended, see Manly et al. 2003). The
Manly selectivity measure (selection ratio = used/available) is
computed, the preference / avoidance is tested for
each habitat, and the differences between selection ratios are computed
and tested.
widesII
computes the selection ratios with design II
data (same availability for all animals, but use measured for each one).
Tests of identical habitat use for all animals, and of habitat
selection are also provided.
widesIII
computes the
selection ratios for design III data (when the use and the
availability are measured for each animal 
see examples on the wild boar below). Habitat selection is tested
using a Chisquare for each animal, and the overall habitat selection
is also tested.
Note that all these methods rely on the following hypotheses: (i) independence between animals, and (ii) all animals are selecting habitat in the same way (in addition to "traditional" hypotheses in these kinds of studies: no territoriality, all animals having equal access to all available resource units, etc., see Manly et al. 2002 for further details).
widesI
returns a list of the class wiI
. widesII
returns a list of class wiII
. widesIII
returns a list of class wiIII
. These objects are all
inheriting from the class wi
. They have the following components:
used.prop 
the proportion of use for each resource type. 
avail.prop 
the proportion of available resources. 
wi 
the Manly selectivity measure (selection ratio: used/available). 
se.wi 
the standard error of the selection ratios. 
comparisons 
a list with the following components:

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 selection ratios are not significant are connected by a line. 
alpha 
the parameter 
avknown 
the parameter 
se.used 
only for designs I, the standard error of the proportion of use. 
se.avail 
only for designs I, the standard error of the available proportion. 
chisquwi 
only for designs I, the results of ChiSquare tests of the hypothesis that the selection ratios are in average equals to zero. 
Bi 
only for designs I, equals to 
Khi2P 
only for designs I, test of random resource use (Pearson statistic). 
Khi2L 
For designs I, test of random resource use (Loglikelihood statistic). For design III, global test of random resource use (Loglikelihood statistic) 
Khi2L1 
only for designs II, test of identical use of habitat by all animals. 
Khi2L2 
only for designs II, test of overall habitat selection. 
Khi2L2MinusL1 
only for designs II, test of hypothesis that animals are on average using resources in proportion to availability, irrespective of whether they are the same or not (= Khi2L2  Khi2L1). 
wij 
only for designs II and III, a matrix with the selection ratios for all animals and all resource categories. 
ICwiupper 
only for designs II and III, the upper limit of the confidence intervals on the selection ratios. 
ICwilower 
only for designs II and III, the lower limit of the confidence intervals on the selection ratios. 
Khi2Lj 
only for designs III, the test of habitat selection for each animal. 
Clement Calenge clement.calenge@ofb.gouv.fr
Manly B.F.J., McDonald L.L., Thomas, D.L., McDonald, T.L. & Erickson, W.P. (2003) Resource selection by animals  Statistical design and Analysis for field studies. Second edition London: Kluwer academic publishers.
Thomas D. L. and Taylor E. J. (1990) Study designs and tests for comparing resource use and availability. Journal of Wildlife Management, 54, 322–330.
compana
for compositional analysis, and
eisera
to perform an eigenanalysis of selection
ratios.
############################
## Example of moose (Manly et al., 2003, p.52)
## Known available proportions on design I data
moose.avail < c(0.34, 0.101, 0.104, 0.455)
moose.used < c(25, 22, 30, 40)
names(moose.used) < c("InBurnInterior",
"InBurnEdge",
"OutOfBurnEdge",
"OutOfBurnFurther")
names(moose.avail) < names(moose.used)
## Computation of wi
(wiRatio < widesI(moose.used, moose.avail))
## plot the values of the selection ratios
opar < par(mfrow=c(2,2))
plot(wiRatio)
par(opar)
############################
## Example of Elk (Manly et al., 2003, p.62)
## Estimated available proportions on design I data
elk.avail < c(15, 61, 84, 40)
elk.used < c(3, 90, 181, 51)
names(elk.used) < c("0%", "125%", "2675%", ">75%")
names(elk.avail) < names(elk.used)
## Computation of wi
(wiRatio < widesI(elk.used, elk.avail, avknown=FALSE))
## plot the values of the selection ratios
opar < par(mfrow=c(2,2))
plot(wiRatio)
par(opar)
############################
## Example of Bighorn (Manly et al., 2003, p.67)
## Known available proportions on design II data
data(bighorn)
## Computation of wi
(wi < widesII(bighorn$used, bighorn$availT, alpha = 0.1))
## plot the values of the selection ratios
opar < par(mfrow=c(2,2))
plot(wi)
############################
## Example of Bighorn (Manly et al., 2003, p.74)
## Estimated available proportions on design II data
## Computation of wi
(wi < widesII(bighorn$used, bighorn$availE, avknown = FALSE, alpha = 0.1))
## plot the values of the selection ratios
plot(wi)
par(opar)
############################
## Example of Wild boar
## Estimated available proportions on design III data
data(puechdesIII)
used < puechdesIII$used
available < puechdesIII$available
## calculation of the selectio ratios
## with sampled availability
(i < widesIII(used,available, avknown = FALSE, alpha = 0.1))
opar < par(mfrow = c(2,2))
plot(i)
par(opar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.