| richards {richards} | R Documentation |
The Richards function, the inverse of
the function, and the derivative of richards(x)
(and the derivative of richards(x) with
respect to log(x) in the point x,
that is derivative of richards(exp(u)) with
respect to u in the point x = exp(u)).
In other implementation of Richards functions and
four parameter logistic functions the argument is
log(x) of the here used argument x.
Here we have a positive concentration in mind, where value depending on the concentration can be described by Richards functions in the logarithm of the concentration.
richards(x, a = 0.1, d = 2.4,
e = solveE(x50, b, ny), x50 = 100,
b = solveB(x = x50, a = a, d = d, ny = ny,
x50 = x50, b4 = b4), b4 = 1,
ny = k - 1, k = 2)
richards.deriv(x, a = 0.1, d = 2.4,
e = solveE(x50, b, ny), x50 = 100,
b = solveB(x = x50, a = a, d = d, ny = ny,
x50 = x50, b4 = b4), b4 = 1,
ny = k - 1, k = 2)
richards.deriv.x(x, a = 0.1, d = 2.4,
e = solveE(x50, b, ny), x50 = 100,
b = solveB(x = x50, a = a, d = d, ny = ny,
x50 = x50, b4 = b4), b4 = 1,
ny = k - 1, k = 2)
richards.inv(y, a = 0.1, d = 2.4,
e = solveE(x50, b, ny), x50 = 100,
b = solveB(x = x50, a = a, d = d, ny = ny,
x50 = x50, b4 = b4), b4 = 1,
ny = k - 1, k = 2)
solveE(x50, b, ny = k - 1, k = 2)
solveB(x = x50, a = 0.1, d = 2.4, x50 = 100, b4 = 1, ny = k - 1, k = 2)
x |
a numeric vector of values at which to evaluate the function. |
y |
a numeric vector of values at which to evaluate the function. |
a |
a numeric parameter representing the horizontal asymptote on the
left side (very small values of input) for b positive,
else the horizontal asymptote on the right side. |
d |
a numeric parameter representing the horizontal asymptote on the
right side (very large values of input) for b positive,
else the horizontal asymptote on the left side. |
b |
a numeric (reciprocal) scale parameter on the input axis, 'growth rate'. |
x50 |
a numeric parameter representing the input value at
the center of the curve:
The value of the Richards function will be midway
between a and d at x50. |
e |
a parameter determine the input value at the inflection point of the curve. |
ny |
a numeric parameter that affects near which asymptote maximum 'growth' occurs. |
k |
an alternative numeric parameter for ny. |
b4 |
a numeric parameter giving the (reciprocal) scale parameter of the
four parameter logistic curve with slope as the 'richards'
function at x50, and same asymptotes. |
richards(x) computes d + (a - d)/z^(1/ny) with
z = (1 + ny * (x/e)^b) = (1 + (2^ny-1) * (x/x50)^b)
for ny different from 0.
For ny equal to 0 the limiting Gompertz curve
d + (a - d) * exp(-z) with z = (x/e)^b is found.
solveE converts the parameter x50 into the parameter e,
the inflection point of the curve: e = x50/((2^(ny) - 1)/ny)^(1/b).
By (2^ny-1) * (x/x50)^b = ny * (x/e)^b = ny * exp(b * (log(x)-log(e)))
we recognize the notation of, e.g., Yin et al., 2003, and also see, how
these parameters of the above Richards function relates to the parameters
'xmid' (log(x50)) and 'scal' (1/b) of SSfpl
for ny equal 1 and the argument input the logarithm of x,
log(x).
solveB finds the parameter b for the Richard curve such
that the slope of the Richard curve is the same as the slope of
the four parameter logistic curve with parameter b4 at x
(where the asymptotes a and d and location x50
of the two curves are identical).
See SSny1 for some examples on the same value found by different functions.
We observe that to compute z^(1/ny) = (1 + (2^ny-1)*(x/x50)^b)^(1/ny)
for some values of ny the mantis z = 1 + (2^ny-1)*(x/x50)^b
should be positive. For ny > 0 this is always the case
(since x and x50 are positive).
For ny < 0 the power function is undefined for z negative,
unless 1/ny is an integer.
For ny < 0 and 1/ny is an integer the here given
Richards function will decline after reaching the asymptote d,
the right hand side asymptote.
A vector with function values.
Jens Henrik Badsberg
Richards, F.J. 1959: A flexible growth function for empirical use. J. Exp. Bot. 10: 290-300.
Xinyou Yin, Jan Goudriaan, Egbert A. Lantinga, Jan Vos And Huub J. Spiertz: A Flexible Sigmoid Function of Determinate Growth. 2003; Annals of Botany 91: 361-371.
demo(showNy)
par(mfrow = c(1, 2))
# pdf("Relevant.pdf")
richardsLines
backFitFpl
relevant()
derivatives
derivatives(xlim = c(0.5, 20000), ylim = c(0, 0.1), ylim.x = c(0, 1.2), f = 4)
par(mfrow = c(2, 4))
# pdf("All.pdf")
# pdf("AboveE.pdf")
aboveE(outer = FALSE, line = 1)
# pdf("Extra.pdf")
extra(outer = FALSE, line = 1)
# pdf("Above.pdf")
above(outer = FALSE, line = 1)
# pdf("Below.pdf")
below(outer = FALSE, line = 1)