Fits a function that returns scaled daily fecundity based on daily temperature
Usage
fit_quadratic(a, b, topt)
Arguments
- a
coefficient 1
- b
coefficient 2
- topt
optimum reproductive temperature
Value
function that accepts x and returns y based on fitted model
Details
Fits a scaled quadratic curve to produce a temperature scalar ranging from 0 to 1:
$$
\frac{a \cdot x^2 + b \cdot x}{a \cdot T_{opt}^2 + b \cdot T_{opt}}
$$
Examples
my_func <- EndoSim:::fit_quadratic(-0.7611, 31.9847, 25)
plot(seq(0, 50, by = 0.1), my_func(seq(0, 50, by = 0.1)), type = "l")