View source: R/sp.env.functions.R
betaFun | R Documentation |
Generation of a beta response curve (see references) according to the equation:
k * (x - p1)^{\alpha} * (p2 - x)^{\gamma}
k is automatically estimated to have a maximum value of P equal to 1.
betaFun(x, p1, p2, alpha, gamma)
x |
a numeric value or vector. The input environmental variable. |
p1 |
a numeric value or vector. Lower tolerance bound for the species |
p2 |
a a numeric value or vector. Upper tolerance bound for the species |
alpha |
a numeric value or vector. Parameter controlling the shape of the curve (see details) |
gamma |
a numeric value or vector. Parameter controlling the shape of the curve (see details) |
p1 and p2 can be seen as the upper and lower critical threshold of the curve.
alpha
and gamma
control the shape of the curve near p1 and p2, respectively.
When alpha
= gamma
, the curve is symmetric. Low values of alpha
and gamma
result in smooth (< 1) to plateau (< 0.01) curves. Higher values result in
peak (> 10) curves.
When alpha
< gamma
, the curve is skewed to the right.
When gamma
< alpha
, the curve is skewed to the left.
a numeric value or vector resulting from the function
Boris Leroy leroy.boris@gmail.com
Maintainer: Boris Leroy leroy.boris@gmail.com
Oksanen, J. & Minchin, P.R. (2002). Continuum theory revisited: what shape are species responses along ecological gradients? Ecological Modelling 157:119-129.
linearFun
, quadraticFun
, custnorm
temp <- seq(-10, 40, length = 100)
# A curve similar to a thermal performance curve
P <- betaFun(x = temp, p1 = 0, p2 = 35, alpha = 0.9, gamma = 0.08)
plot(P ~ temp, type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.