SSexplin | R Documentation |
Self starter for an exponential-linear growth equation
explin(t, cm, rm, tb)
SSexplin(t, cm, rm, tb)
t |
input vector (time) |
cm |
parameter related to the maximum growth during the linear phase |
rm |
parameter related to the maximum growth during the exponential phase |
tb |
time at which switch happens |
J. GOUDRIAAN, J. L. MONTEITH, A Mathematical Function for Crop Growth Based on Light Interception and Leaf Area Expansion, Annals of Botany, Volume 66, Issue 6, December 1990, Pages 695–701, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/oxfordjournals.aob.a088084")}
The equation is:
(cm/rm) * log(1 + exp(rm * (t - tb)))
This function is described in Archontoulis and Miguez (2015) - (doi:10.2134/agronj2012.0506).
a numeric vector of the same length as x containing parameter estimates for equation specified
explin: vector of the same length as x using a explin function
require(ggplot2)
set.seed(12345)
x <- seq(1,100, by = 5)
y <- explin(x, 20, 0.14, 30) + rnorm(length(x), 0, 5)
y <- abs(y)
dat <- data.frame(x = x, y = y)
fit <- nls(y ~ SSexplin(x, cm, rm, tb), data = dat)
## plot
ggplot(data = dat, aes(x = x, y = y)) +
geom_point() +
geom_line(aes(y = fitted(fit)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.