View source: R/analyse_sigmoidal.R
| sigmoid_core | R Documentation |
sigmoid_core() evaluates a 4-parameter sigmoid of the given shape
and its partial derivatives on the canonical parameters, shared by the
selfStart model functions of SSlogistic(), SSgompertz(),
SSgompertz_left(), and SSsigmoidal_drift(). Every shape is a
function W(u) of u = k * (t - xmid) with rate k = c * slope / (B - A) (c = 4 symmetric, e Gompertz), so with P = dW/du the
partials share one form. sigmoid_model() attaches the gradient over
the parameters written as bare symbols in mCall (see
free_params()), so stats::nls() skips stats::numericDeriv().
sigmoid_core(t, A, B, xmid, slope, shape)
sigmoid_model(mCall, t, A, B, xmid, slope, shape)
t |
A numeric vector of the predictor variable (time). |
A |
A numeric parameter for the starting asymptote of the response variable. |
B |
A numeric parameter for the ending asymptote of the response variable. |
xmid |
A numeric parameter for the time at the inflection point (the
steepest point) of the curve, in units of the predictor variable |
slope |
A numeric parameter for the response rate |
shape |
Character; the 4-parameter sigmoidal shape. One of
|
mCall |
A matched call to the model function. |
sigmoid_core(): a list of the curve val, the partial
derivatives by parameter name, and the rate k. sigmoid_model(): a
numeric vector of predicted values with a "gradient" attribute when
any parameter is free.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.