# like.Wi: Likelihood measure of niche breadth In RInSp: R Individual Specialization

 Likelihood and Wi R Documentation

## Likelihood measure of niche breadth

### Description

The procedure calculates the estimation of likelihood measures of niche breadth and overlap described in Petraitis (1979).

### Usage

like.Wi(dataset)


### Arguments

 dataset  Object of class RInSp with data.

### Details

The function returns the likelihood of the observed diet (λ_i) the associated probability , and the value of the Petraitirs' W. The likelihood of the observed diet of individual i is:

λ_i = ∏_j (\frac{q_j}{p_{ij}})^{n_{ij}}

where q_j is the population proportion of the resource j, p_{ij} is the proportion of the resource j in the diet of the individual i, and n_{ij} is the number of items for the individual i and the resource j.

This can be used to calculate a p-value to test the significance of the diet specialization, as -2ln(λ) is distributed as a chi-square with (r-1) degrees of freedom, where r is the number of resource categories.

The generalised likelihood ratio test rejects the null hypothesis for a unilateral alternative hypotesis using significance level α if:

-2ln(λ) > χ^2_{(r-1)}

Petraitis' W is computed following:

W_i = λ_i^{(1/D_i)}

where D_i is the number of diet items recorded in the diet of individual i. This index is a measure of niche width relative to a specified distribution. For a complete generalist individual, W_i = 1, and the value decreases with greater specialization.

### Value

Return a list of class RInSp with:

 MeanWi the mean population value of Wi; ResCat the number of resource categories; ind.vals A matrix with three columns: “Likelihood” with value of the likelihood index for the individual i; “p-value” for the the probability associated to the likelihood value; “Wi” with the value of the Petraitis' W index for the individual i.

### Author(s)

Dr. Nicola ZACCARELLI

### References

Petraitis, P. S. 1979. Likelihood measures of niche breadth and overlap. Ecology 60(4): 703-710.

Bolnick, D.I., L.H. Yang, J.A. Fordyce, J.M. Davis, and Svanback, R. 2002. Measuring individual-level resource specialization. Ecology 83: 2936-2941.

### Examples

# Likelihood and Wi example with stickleback data
# from Bolnick and Paull 2009
data(Stickleback)
# Select a single spatial sampling site (site D)
SiteD <- import.RInSp(Stickleback, row.names = 1,
info.cols = c(2:13), subset.rows = c("Site", "D"))
Wi <- like.Wi(SiteD)
rm(list=ls(all=TRUE))


RInSp documentation built on May 20, 2022, 9:06 a.m.