View source: R/99_growth_curves.R
fn_lin_plat | R Documentation |
A simple piecewise function that models a linear increase from zero to a plateau. The function rises linearly between two time points and then levels off at a constant value.
fn_lin_plat(t, t1 = 45, t2 = 80, k = 0.9)
t |
A numeric vector of input values (e.g., time). |
t1 |
The onset time of the response. The function is 0 for all values less than |
t2 |
The time at which the plateau begins. Must be greater than |
k |
The height of the plateau. The function linearly increases from
0 to |
f(t; t_1, t_2, k) =
\begin{cases}
0 & \text{if } t < t_1 \\
\dfrac{k}{t_2 - t_1} \cdot (t - t_1) & \text{if } t_1 \leq t \leq t_2 \\
k & \text{if } t > t_2
\end{cases}
This function is continuous but not differentiable at t1
and t2
due to the piecewise transitions. It is often used in agronomy and ecology
to describe growth until a resource limit or developmental plateau is reached.
A numeric vector of the same length as t
, representing the function values.
library(flexFitR)
plot_fn(
fn = "fn_lin_plat",
params = c(t1 = 34.9, t2 = 61.8, k = 100),
interval = c(0, 108),
n_points = 2000,
auc_label_size = 3
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.