PSicalc {RInSp} | R Documentation |
Calculate the proportional similarity index
Description
A measure of individual specialization proposed by Bolnick et al. (2003), based on the average pairwise overlap of the niche distribution of individuals and the population.
Usage
PSicalc(dataset, pop.diet = "sum", exclude = FALSE, replicates=999, precision = 1e-9)
Arguments
dataset |
Object of class RInSp with data. |
pop.diet |
Option specifying the way to calculate the population diet. Valid values are “sum” or “average”. |
exclude |
A logical value to exclude or not the individual in variance estimates. Defalut is FALSE, i.e. keep all individuals. |
replicates |
Number of replicates for Monte Carlo resampling. |
precision |
a filter to remove from the PS matrix all values which are lower than "precision". In this way some interactions are removed due to their small weight in the PS matrix. |
Details
Both Schoener (1968) and Feinsinger et al. (1981) advocated using Czekanowski's proportional similarity index (PS) for interspecific niche studies. Adapted to individual-level analyses, the diet overlap between an individual and the population is:
where is the frequency of category j in the individual i's diet, and
is the frequency of category j in the population as a whole.
The prevalence of individual specialization (IS) in the population is then measured by the average of individuals' PS values:
Monte Carlo resampling for hypothesis testing is implemented for the case when all individuals are kept.
The user has the option of calculating each individual's and
using
values calculated by either including or excluding individual i.
Value
The function returns a list composed by:
PSi |
A column vector with the individual proportional similarity index for each individual i. |
IS |
The value of the prevalence of individual specialization. |
PSi.montecarlo |
Monte Carlo resampling simulation values for |
Var.montecarlo |
Monte Carlo resampling simulation values for |
VarPSi |
A column vector of the estimated variance for each individual. |
population.diet |
A vector describing the population diet. A matrix is returned when “exclude” is TRUE. |
IS.pvalue |
Probability value for the observed IS against the Monte Carlo resampling simulation. Consider to use more than 1000 simulations. |
montecarlo |
Monte Carlo resampling simulation values for |
num.individuals |
The number of individuals of the data set. |
parmeter |
The value points to the column of the “montecarlo” matrix for plotting results. |
Precission |
The value of the selected threshold for precision. |
Author(s)
Dr. Nicola ZACCARELLI
References
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.
Feinsinger, P., Spears, E. E., and Poole, R. W. 1981. A simple measure of niche breadth. Ecology 62: 27-32.
Schoener, T.W. 1968. The Anolis lizards of Bimini: resource partitioning in a complex fauna. Ecology 49: 704-726.
Examples
# PSicalc example using stickleback data from Bolnick and Paull 2009
data(Stickleback)
# Select a single spatial sampling site (site A)
GutContents_SiteA <- import.RInSp(Stickleback, row.names = 1,
info.cols = c(2:13), subset.rows = c("Site", "A"))
# Warning, the number of replicates is set low to speed up he example!
# Note, for real analyses we recommend to set replicates => 999
PSi <- PSicalc(GutContents_SiteA, exclude = FALSE, replicates = 99)
sumMC.RInSp(PSi)
rm(list=ls(all=TRUE))