Learn R Programming

goeveg (version 0.3.0)

specresponse: Species response curves

Description

This function fits species response curves to visalize a species response to environmental gradients or ordination axes. It is based on Logistic Regression using Generalised Linear Models (GLMs) or Generalized Additive Models (GAMs) with integrated smoothness estimation. For drawing multiple curves into one plot use specresponses.

Usage

specresponse(species, var, main, xlab, model = "unimodal", method = "env", axis = 1)

Arguments

species
Vector containing species abundances (per plot).
var
Vector containing environmental variable (per plot) OR vegan ordination result object if method = "ord".
main
Optional: Main title.
xlab
Optional: Label of x-axis.
model
Defining the assumed species response: Default method = "unimodal" fits a unimodal response. Other methods are method = "linear" (linear response), method = "bimodal" (bimodal response), method = "auto" (automatic selection based on AIC) and method = "gam" (using GAM with smoother)
method
Method defining the type of variable. Default method = "env" fits a response curve to environmental variables. Alternatively method = "ord" fits a response along an ordination axis.
axis
Ordination axis (only if method = "ord").

Value

Returns an (invisible) object containing the model results

Details

For response curves based on environmental variable gradients the argument var takes a single vector containing the variable corresponding to the species abundances. The direct response of a species to the environmental variable is shown. For a response to ordination axis (method = "ord") the argument var requires a vegan ordination result object (e.g. from decorana, cca, rda or metaMDS). Response of species to axis is shown; note that meaning of axis differ in unconstrained and constrained methods. First axis is used as default.

See Also

specresponses

Examples

Run this code
## Draw species response curve on environmental variable
specresponse(schedenveg$ArrElat, schedenenv$soil_depth)

## Draw species response curve on environmental variable with
## custom labels
specresponse(schedenveg$ArrElat, schedenenv$soil_depth, main = "Arrhenatherum elatius",
       xlab = "Soil depth")

## Draw species response curve on ordination axes
## First calculate DCA
library(vegan)
scheden.dca <- decorana(schedenveg)

# Using a linear model on first axis
specresponse(schedenveg$ArrElat, scheden.dca, method = "ord", model = "linear")
# Using an unimodal model on second axis
specresponse(schedenveg$ArrElat, scheden.dca, method = "ord", axis = 2)

Run the code above in your browser using DataLab