SSscard3 | R Documentation |
Self starter for smooth cardinal temperature response function
scard3(x, tb, to, tm, curve = 2)
SSscard3(x, tb, to, tm, curve = 2)
x |
input vector (x) which is normally ‘temperature’. |
tb |
base temperature |
to |
optimum temperature |
tm |
maximum temperature |
curve |
curvature (default is 2) |
An example application can be found in (doi:10.1016/j.envsoft.2014.04.009)
This function is described in Archontoulis and Miguez (2015) - (doi:10.2134/agronj2012.0506) - Equation 5.1 in Table 1.
scard3: vector of the same length as x using a scard3 function
Caio dos Santos and Fernando Miguez
## A temperature response function
require(ggplot2)
set.seed(1234)
x <- 1:50
y <- scard3(x, 13, 25, 36) + rnorm(length(x), sd = 0.05)
dat1 <- data.frame(x = x, y = y)
fit1 <- nls(y ~ SSscard3(x, tb, to, tm), data = dat1)
ggplot(data = dat1, aes(x, y)) +
geom_point() +
geom_line(aes(y = fitted(fit1)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.