SSbeta5 | R Documentation |
Self starter for Beta 5-parameter function
beta5(temp, mu, tb, a, tc, b)
SSbeta5(temp, mu, tb, a, tc, b)
temp |
input vector which is normally ‘temperature’ |
mu |
mu parameter (see equation) |
tb |
base (low) temperature at which no expansion accurs |
a |
parameter describing the initial increasing phase |
tc |
critical (high) temperature at which no expasion occurs |
b |
parameter describing the decreasing phase |
For details see the publication by Yin et al. (1995) “A nonlinear model for crop development as a function of temperature ”. Agricultural and Forest Meteorology 77 (1995) 1-16
The form of the equation is:
exp(mu) * (temp - tb)^a * (tc - temp)^b
.
beta5: vector of the same length as x (temp) using the beta5 function
require(minpack.lm)
require(ggplot2)
## Temperature response example
data(maizeleafext)
## Fit model
fit <- nlsLM(rate ~ SSbeta5(temp, mu, tb, a, tc, b), data = maizeleafext)
## Visualize
ndat <- data.frame(temp = 0:45)
ndat$rate <- predict(fit, newdata = ndat)
ggplot() +
geom_point(data = maizeleafext, aes(temp, rate)) +
geom_line(data = ndat, aes(x = temp, y = rate))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.