Download Transitivity – a FORTRAN program for the analysis of

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Transitivity
1
Transitivity – a FORTRAN program
for the analysis of multivariate competitive
interactions
Version 1.1
Werner Ulrich
Nicolaus Copernicus University in Toruń
Chair of Ecology and Biogeography
Lwowska 1, 87-100 Toruń; Poland
e-mail: ulrichw @ umk.pl
Latest update: 16.12.2013
1. Introduction
on the construction of patch transition matrices (P),
Species differ in their competitive ability, and such as those used in Markov chain models as prothese differences may translate to observed inequali- posed by Ulrich et al. (2013). The basis is a randomities in species’ relative abundances within multi- zation test to evaluate the degree of intransitivity from
species assemblages. Ecologists have devoted much these P matrices in combination with empirical or simeffort inferring competitive processes from observed ulated C matrices. Ulrich et al. (2013) related empiripatterns of species abundances and morphology, and cally-derived competition matrices C to an explicit
from changes in the temporal and spatial distribution colonization-interaction model to obtain patch transiof species (Chesson 2000).
tion matrices P and used a ‘reverse engineering’ ap-
Many theoretical models of competitive inter- proach to infer the structure of the competition (C) and
actions assume that species can be ranked unequivo- the transition (P) matrices from an empirical (temporal
cally (A>B>C…>Z) according to their competitive or spatial) A matrix. There is no unique solution to this
strength or resource utilization efficiency (Tilman problem because a large number of different competi1988). However, intransitive competitive networks tion matrices (C) can generate the same patch transi(Gilpin 1975) can generate loops in the hierarchy of tion matrix (P) that will reproduce the A matrix. Howcompetitive strength (e.g. the rock-scissors-paper ever, by simulating a large set of stochastically created
game, in which A>B>C>A). Theoretical studies have C matrices, the set of matrices that provide the best fit
shown that competitive intransitivity can moderate the to an empirical A matrix can be analyzed with respect
effects of competition, allowing weak competitors to to their transitivity patterns.
coexist with strong ones (Laird and Schamp 2006).
Despite the conceptual simplicity of intransitive competitive hierarchies, the empirical estimation
of the strength of competition and the frequency of
2. Metrics and Reversed engineering
Ulrich et al. (2013) used a simple Markov chain
competitive intransitivity in nature has proven diffi- model that predicts relative abundances. In this model,
cult. The Fortran 95 software Transitivity is based up- a m  m patch transition matrix P describes the proba-
2
bility pij of a transition from a patch occupied by spe-
and for 1 ≤ i ≤ m
cies i to a patch occupied by species j in a single time
These equations generate the required transition
step.
Transitivity
matrix P for an arbitrary number m of species in terms
of competitive strength matrices for sets consisting of
If the probabilistic outcome of species interac-
tions are fully described by the entries of C, Ulrich et
(m − 1) species.
The calculation of the total probability for all pij
al.
(2013) calculated the patch transition matrix P in
of the transition matrix P from the entries of the com-
terms of the competition matrix C.
The model assumes:
petition matrix C needs the evaluation of all combina-
1. There are many homogeneous patches, each of
tions of cik (k ≠ i,j). Because this becomes computa-
which can be colonized and occupied by individuals of tionally challenging at higher species richness Transia set of m species;
tivity uses the approximation introduced by Ulrich et
2. All species produce a large number of potential
al. (2013)
propagules, so there is a ‘propagule rain’, and colonization is never limited by dispersal limitation;
3. Only a single species can occupy one patch at a
time;
4. In a single time-step, a species occupying a patch
either retains its occupancy or is replaced by a different species;
5. During a single time-step, each resident species in a
patch may potentially engage in a pairwise competitive encounter with all remaining (m − 1) species that
do not occupy that patch. The (m − 1) invading species
may all interact with the resident species and each one
can potentially replace it;
6. Within a time step, the order in which the potentially invading species encounter the resident is random;
7. During a single time step, one of the invading species replaces the resident species, or the resident species persists in the patch;
8. Local dispersal limitation is not important and the
set of patches is spatially unstructured.
To generate the formula for pij, i, j = 1, ...,m, for
an arbitrary m, we need the following notation: given a
set A = {a1, ..., an} of species with the corresponding
competition matrix C, let P(A)[aj → ai] denote the
probability that species aj is replaced by ai, i, j = 1, ...,
n.
Within this notation: for 1 ≤ i ≠ j ≤ m
where
is the geometric average of the respective cik
values.
To estimate the degree of intransitivity in a given community, we need first to estimate the transition
matrix P from an observed distribution of species
abundances or occurrences (Ulrich et al. 2013). Depending on the data, there are three different scenarios.
The first and most obvious approach relies on appropriate time series data. If data are available from at
least t+1 time steps, the single abundance vectors of
each step can be converted into two matrices N1,t,
which runs from generation 1 to t, and N2,t+1, which
runs from generation 2 to t+1. Combining these two
matrices yields:
P = N2,t+1 N1,tT (N1,tN1,tT)-1
where
T
denotes the transpose. This approach
allows for the estimation of the P matrix from an A
matrix of consecutive temporal censuses of an assemblage. To estimate P Transitivity uses a ‘reverse engineering’ approach and generates n = 100,000 randomly assembled C matrices, in which each entry above
the diagonal in the C matrix is chosen from a random
uniform [0,1] distribution. It then transformed the randomly assembled C matrices into P transition matrices
Transitivity
3
to predict the N2,t+1 matrices from our Markov chain
Where N is a count of species pairs for which
model. The software uses average rank order correla- cij < cji after the matrix has been sorted to maximize
tions between respective columns in the predicted and the number of matrix elements with p > 0.5 in the upobserved N2,t+1 matrices to assess goodness of fit, and per right triangle (Ulrich et al. 2013). Accordingly
selects those P and C matrices that generated the best transitivity
in
the
P
matrix
is
estimated
by
fit to the observed vector of relative abundances.
The second approach is based on spatial abundance
(i<k and i,k≠j)
data for m species collected at i = 1 to n sites for which
environmental variables are available. Ulrich et al.
(2013) partitioned the variance of species abundances
4. Program run
Transitivity first asks for the method to esti-
into a part explained by competitive effects and a second part explained by the environmental variables:
mate the degree of transitivity. The options are envi-
PU=U+E. Using multiple regression they received in
ronmental date (e), time series data (t), or as the de-
T
T
T
T -1
P = I + X H U (UU )
fault abundance data only (n).
Next the program asks whether to calculate
with U being an mn matrix of species relative abundances among n sites, H being the nh matrix of h
environmental variables, X being the vector of regression parameters that solves UT=HX, and I being the
m×m identity matrix.
As with time series data, the software uses the
‘reverse engineering’ approach to compare predicted
and observed environmental terms E = XTHT to find
those C and P matrices that best mimic the observed
abundance distributions. For the environmental calculations the abundance data contained in the abundance
vector A are initially ln(x) transformed (leaving zero
counts unchanged) with x being the adjusted absolute
abundances where the least abundant species has at
least abundance x=1. To avoid undesired effects of
differential measurements the environmental variables
are Z-transformed. After multiple regression the resulting vector U is back transformed.
The third approach uses spatial data only and
tries to identify the best fitting C and P matrices directly from the matrix of observed relative abundances
at n sites using reversed engineering (Ulrich et al.
2013).
bivariate competitive strength matrices C (option b) or
only transition matrices P (option p). In the first case
the output contains also the respective P matrices.
Then give the names of the output and matrix
file names. Both are shown in the two Figures below.
Carriage returns assign the default names Output.txt
and Matrix.txt.
The default number of random matrices C or P
is 100,000. You can change this number with the next
option.
As a standard, Transitivity eliminates empty
rows and columns from the abundance matrix. You
can choose whether to retain these. Of course, the input matrix should in general not contain empty columns, because they have no sound ecological interpretation in the present context. However, in some cases
you may wish to retain empty rows, for instance in
automatic data processing of large data sets or for
comparison of patterns with and without focal species.
The last option regards the input files. Give
them with extension (example: file.txt). In the case of
multiple runs a carriage return results in the question
for the name of the file that contains the matrix file
3. Metrics of transitivity
Transitiv estimates transitivity of C matrices by
(i<j)
4
Transitivity
names for multiple analysis (cf. the example above). spective variables.
The first line of the batch file has to be a comment
line. All of the files have to be in the same directory.
Input files have to be space delimited. Tab delimitation is not allowed.
In the case of the time series and abundance
only approaches you need a single input files as shown
above. For the environmental variable approach the
software asks for a second file that contains the re-
5. Output
Transitivity returns two output files. The first,
Matrix.txt, contains the species abundance matrix, the
abundance distribution, best fit transition and competition matrices as well as the observed and predicted
(dominant eigenvector of the transition matrix) abun-
Transitivity
5
dance distributions.
the NBestFit performing matrices are given (in the
The second file, Output.txt, gives the file example below only the best fitting: NBestFit =1).
name, method used (predicting competition and transi- Then, the probability is given that the predicted degree
tion matrices (b) or transition matrices only (p)), the of transitivity is less than 1.0. Finally, in the case of
benchmark limit and matrix match (see below), the the environmental approach the software provides the
numbers of best fitting competition or transition matri- average coefficient of determination (r2) of the multices used for the calculation of confidence limits, num- ple regressions of each species involved.
bers of species and sites, and four metrics. The first
An important point regards the BenchM and
(Metric1) is either C (in the case of the method = ’b’ Match output. The reverse engineering procedure uses
option) or  (in the case of the method = ’p’ option) rank order correlation to compare predicted abundancP
of the best performing competition or transition ma- es and observed abundances and retains as a default
trix. Next, the mean metric value and the lower those competition and transition matrices that predict
(DownCL) and upper (UpCL) 95% confidence limit of abundances that are correlated with the observed ones
by r > 0.95. If less than NBestFit (default = 100) out
6
of the 100,000 random test matrices fulfil this criterion
Transitivity
7. System requirements
the threshold is reduced by a step of 0.1, thus the sec-
Transitivity is written in FORTRAN 95, has
ond threshold is r = 0.85. The software reduces the been compiled under a 64 bit architecture, and runs
threshold as long as sufficient (k = NBestFit) test ma- under Windows 8, 7, XP, and Vista. The present vertrices fulfil the required correlation. In the case shown sion is only limited by the computer’s memory.
in the software window the threshold was r = 0.0 and
the abundances predicted by the single best fit competition matrix correlated weakly (r = 0.443) with the
observed abundances across the sites. That means even
100,000 random competition matrices were not able to
mimic observed abundances. In such a case the fit is
very low and the predicted degree of intransitivity is
not very reliable. This is a strong indication that other
factors overrule competition and that competitive effects are not the major driver to determine species
abundances. The correlation for the right eigenvector
can be inferred from the Matrix.txt file where observed
and predicted abundances of the best fit are given.
6. Citing Transitivity
Transitivity is freeware but nevertheless if you
use Turnover in scientific work you should cite Transitivity as follows:
Ulrich W. 2012. Transitivity – a FORTRAN program
for the analysis of bivariate competitive interactions.
Version 1.1. www.keib.umk.pl.
8. Acknowledgements
Development of this program was supported
by grants from the Polish Science Committee (KBN, 3
P04F 034 22, KBN 2 P04F 039 29 ).
9. References
Chesson, P. 2000. Mechanisms of maintenance
of species diversity. Annual Review of Ecology and
Systematics 31: 343–366.
Gilpin, M. E. 1975. Limit cycles in competition communities. American Naturalist 109: 51–60.
Laird, L. A. and B. S. Schamp. 2006. Competitive intransitivity promotes species co-existence.
American Naturalist 168: 182-193.
Tilman, D. 1988. Plant Strategies and the Dynamics and Structure of Plant Communities. Monographs in Population Biology 26. Princeton University
Press, Princeton.
Ulrich, W., Soliveres, S., Kryszewski W.,
Maestre F. T., Gotelli, N. J. 2014. Matrix models for
quantifying competitive intransitivity. Oikos, in press.