View source: R/99_growth_curves.R
fn_quad_plat | R Documentation |
Computes a value based on a quadratic-plateau growth curve.
fn_quad_plat(t, t1 = 45, t2 = 80, b = 1, k = 100)
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 |
b |
The initial slope of the curve at |
k |
The plateau height. The function transitions to this constant value at |
f(t; t_1, t_2, b, k) =
\begin{cases}
0 & \text{if } t < t_1 \\
b (t - t_1) + \frac{k - b (t_2 - t_1)}{(t_2 - t_1)^2} (t - t_1)^2 & \text{if } t_1 \leq t \leq t_2 \\
k & \text{if } t > t_2
\end{cases}
This function allows the user to specify the initial slope b
. The curvature term
is automatically calculated so that the function reaches the plateau value k
exactly
at t2
. The transition to the plateau is continuous in value but not necessarily smooth
in derivative.
A numeric vector of the same length as t
, representing the function values.
library(flexFitR)
plot_fn(
fn = "fn_quad_plat",
params = c(t1 = 35, t2 = 80, b = 4, 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.