Skip to contents

Linear Plateau Linear with Constrains

Usage

fn_lin_pl_lin2(t, t1, t2, dt, k, beta)

Arguments

t

Numeric. The time value.

t1

Numeric. The lower threshold time.

t2

Numeric. The upper threshold time before plateau.

dt

Numeric. dt = t3 - t2.

k

Numeric. The maximum value of the function.

beta

Numeric. Slope of the linear decay.

Value

A numeric value based on the linear plateau linear model.

Details

$$ f(t; t_1, t_2, dt, k, \beta) = \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_2 \leq t \leq (t_2 + dt) \\ k + \beta \cdot (t - (t_2 + dt)) & \text{if } t > (t_2 + dt) \end{cases} $$

Examples

library(flexFitR)
plot_fn(
  fn = "fn_lin_pl_lin2",
  params = c(t1 = 38.7, t2 = 62, dt = 28, k = 0.32, beta = -0.01),
  interval = c(0, 108),
  n_points = 2000,
  auc_label_size = 3
)