Michael Greenacre. 2013. Fuzzy coding in constrained ordinations. Ecology 94:280286. http://dx.doi.org/10.1890/12-0981.1


Artificial and real data sets, and R functions and scripts to perform canonical correspondence analysis using fuzzy-coded explanatory variables, with adjustment of the variance explained.
Ecological Archives E094-021-S1.


File list (downloads)


Michael Greenacre
Department of Economics and Business
Universitat Pompeu Fabra
Ramon Trias Fargas 25--27
E-08005 Spain

Faculty of Biological Sciences, Fisheries and Economics
University of Tromsø
N-9037 Norway

E-mails: michael.greenacre@upf.edu, michael.greenacre@gmail.com

File list

artificial.csv (md5: 2dcf93451985a5205c88df0f24dcc709)  - abundance data for 300 samples on 5 species (A, B, C, D and E) and environmental data on 2 variables (X and Y).
BarentsFish.csv (md5: e61ef26ef9a7fec70f831535587a5966)  - fish abundance data set ‘BarentsFish’, on 89 samples from the Barents Sea, along with longitude and latitude positions, depth and temperature
fuzzy.tri.R (md5: 0bf5013ae24752cd27ed48e585a53870)  - R function fuzzy.tri for fuzzy coding into any number of categories using triangular membership functions
CCA.R (md5: c6b9a3207e7e3405545a673b5a536daa)  - R function CCA for basic computations of a CCA
fuzzyscript.R (md5: 4ce442235d7d6e107ff498fc62cc1789)  - R script illustrating several analyses from this report (see description below)


The two data files used in the report are given in csv format. Two R functions are provided: (i) to fuzzy code continuous variables into a chosen number of fuzzy categories, or into categories based on user-defined hinge points: (ii) to compute a basic canonical correspondence analysis, using the singular-value decomposition, with output of the sample (row) principal coordinates and the variable (column) contribution coordinates, as well as parts of constrained and unconstrained inertia. This function is useful for computing the adjusted percentage of variance explained (see R script next). Finally an R script is provided illustrating the following analyses: (a) the computation of the adjusted R2 values in CCA by the permutation procedure proposed by Peres-Neto et al. (2006), (b) the conversion of continuous environmental variables (including spatial ones) into fuzzy-coded variables, and (c) plotting the results of the ‘BarentsFish’ analysis.

Reference: Peres-Neto, P. R., P. Legendre, S. Dray, and D. Borcard. 2006. Partitioning of species data matrices: estimation and comparison of fractions. Ecology 87:2614–2625.