SScard3 | R Documentation |
Self starter for cardinal temperature response function
card3(x, tb, to, tm)
SScard3(x, tb, to, tm)
x |
input vector (x) which is normally ‘temperature’. |
tb |
base temperature |
to |
optimum temperature |
tm |
maximum temperature |
This function is described in Archontoulis and Miguez (2015) - (doi:10.2134/agronj2012.0506)
card3: vector of the same length as x using a card3 function
Caio dos Santos and Fernando Miguez
## A temperature response function
require(ggplot2)
set.seed(1234)
x <- 1:50
y <- card3(x, 13, 25, 36) + rnorm(length(x), sd = 0.05)
dat1 <- data.frame(x = x, y = y)
fit1 <- nls(y ~ SScard3(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.