elgrin: Teasing apart the effects of environmental variations and...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/elgrin.R

Description

ELGRIN jointly models the presence and absence of all species in a given area in function of environmental covariates and the topological structure of the known metaweb

Usage

1
elgrin(presence, metaweb, environmentvar, ncores=1)

Arguments

presence

A matrix with presence/absence of species (rows) at different locations (columns), coded in 0/1 format (1 for presence).

metaweb

A matrix or a igraph object. This represents the metaweb/metawnetwork of interactions as an adjacency matrix or as a graph respectively.

environmentvar

A matrix with environmental variables (columns) at different locations (rows).

ncores

The number of cores to use, i.e. at most how many threads will run simultaneously. Default is 1 (no parallelization).

Details

ELGRIN (in reference to Charles Elton and Joseph Grinnell) can handle the effects of both environmental factors and known ecological interactions (aka a metanetwork) on species distributions. We rely on Markov random fields, a family of flexible models that can handle dependencies between variables using a graph.

Value

elgrin returns an object of class list with the following components:

a

A vector of species prevalence.

al

A vector of richness capacity (or expected number of species) at each location.

b

A matrix of linear environmental parameters.

c

A matrix of quadratic environmental parameters.

betaPres

A vector of co-presence strength (or avoidance when <0) at each location.

betaAbs

A vector of co-absence strength (or avoidance when <0) at each location.

Author(s)

Authors: Vincent Miele Maintainer: Vincent Miele <vincent.miele@univ-lyon1.fr>

References

Vincent Miele, Catherine Matias, Marc Ohlmann, Giovanni Poggiato, St ephane Dray and Wilfried Thuiller, Quantifying the overall effect of biotic1interactions on species communities along2environmental gradients, submitted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: data(virtualComCompetition)
vcom <- virtualComCompetition

result <- elgrin(vcom$presence, vcom$metaweb, vcom$environmentvar)
str(result)

plot(result$betaPres, result$betaAbs, xlab="Co-presence", ylab="Co-absence")
abline(h=0, col=2)
abline(v=0, col=2)

## End(Not run)

econetwork documentation built on Oct. 18, 2021, 5:09 p.m.