dsicom: Community level Distance-based specialisation index

View source: R/DSICom.R

dsicomR Documentation

Community level Distance-based specialisation index

Description

Measures the distance-based specialization indesx (DSI) of consumers in a set of communities. Relies on resource use information from an interaction matrix or array, resource similarities from a distance matrix or phylogeny, and local resource availability data standardizing the null models.

Usage

dsicom(Int, Dist, Abund, Rep = 999, Part = TRUE)

Arguments

Int

Is an interaction array for which Specialization is to be measured. Consumers are in rows, resources in the columns and different locations (or other "local" partition - e.g. time) are slices. More than one locality is necessary to the function to work. With a single location dsi should be used instead

Dist

Object of class phylo with the $tip.label information matching Abundance data. The phylogeny should have all resource classes present in Abund and will be pruned to remove resource classes absent from Abund. Alternatively, a distance matrix, with dissimilarities between resource classes. Dimension names must match Abund.

Abund

Matrix of local abundances/sampling effort of the resources in the interaction array at different locations.

Rep

Number of iterations for the null model, defaults to 999.

Part

A logical indicating whether variability in DSI measured locally should be partitioned between species and localities. If set to TRUE, (the default), variation in DSI* measured locally is orthogonally partitioned between species and communities into three components of mean squared distances between DSI* values: differences within species, differences within communities, residual variation between species and communities. The matrix with DSI* values is then randomized Rep times, keeping the absences fixed, and in each iteration the same components of variation are calculated. A Z-score, measuring the effect size of the observed components relative to the null model is then measured.

Value

Returns an object of class dsicom, with the following elements:

data

A list with the three objects used to calculate DSI - The interaction array, distance matrix and resource availability matrix

consumers

A character vector with the names of consumer species

resources

A character vector with the names of resource classes (often species)

communities

A character vector with the names of communities or other local unities where specialization is measured

MPD

A numeric matrix with the abundance averaged mean pairwise distance between resource items used by each consumer species in each community separately

null

An array with Rep rows, consumers in columns, and communities in the third dimension, with all MPD values obtained by the null model

DSI

A numeric matrix with unstandardized DSI values measured locally. These are calculated as Z-scores of the MPD values, compared to the null distribution of MPDs obtained from the null model. It can be used to classify consumers as specialists, non-selective or generalists, but is not appropriate for comparisons among species with different sampling effort

lim

Theoretical maximum (for species with positive DSI) and minimum (for species with negative DSI) DSI values attainable for the sample size and resource similarity of each consumer species. Used to standardize DSI and generate comparable DSI* values. Maximum is obtained by assuming the species is a monophage, and minimum is calculated by using a Simulated annealing algorithm to distribute the recorded number of interactions among resource classes in such a manner that maximizes MPD

DSIstar

A numeric matrix with standardized DSI values (DSI*) measured locally in communities. This is the index as proposed in Jorge et al. (2017). DSI* values vary between -1 (extreme generalization) to 1 (extreme specialization). This should be the preferred value to be used when comparing species and communities, as it has a very straightforward interpretation and is controlled for differences both in sampling intensity, co-occurrence with resources and resource similarity differences.

dsicom

A numeric vector with abundance weighted avarage DSI* (DSICom) of the species that occur in each community.

nullpart

If Part is set to TRUE (the default), the DSI* variation components calculated from the null model are recorded in a matrix with components in columns and null model iterations in rows. IntraSP amounts to differences within species, IntraCom amounts to differences within communities, and Residual amounts to residual variation between species and communities.

part

If Part is set to TRUE (the default), A dataframe, with the three components of variation in DSI* are presented, along with the Z-scores with the effect sizes of the observed variability components compared to the null model and p values calculated as bi-caudal probabilities by comparing observed values with the null model, for each component. IntraSP amounts to differences within species, IntraCom amounts to differences within communities, and Residual amounts to residual variation between species and communities.


leorjorge/dizzy documentation built on Jan. 18, 2025, 6:51 a.m.