View source: R/analyse_sigmoidal.R
| init_inflection | R Documentation |
Shared helper that locates the empirical inflection (peak of
|dx/dt| after smoothing) and returns the corresponding xmid and
slope initial values. Falls back to the half-response point and a
mean-rate slope when the derivative is degenerate.
init_inflection(x, t, A_init, B_init)
x |
A numeric vector of the response variable (sorted by |
t |
A numeric vector of the predictor variable. |
A_init |
Estimated starting asymptote. |
B_init |
Estimated ending asymptote. |
A list with elements idx (integer index into x), xmid
(numeric t value at the inflection), and slope (numeric dx/dt
at the inflection).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.