expoDecay | R Documentation |
These functions provide the exponential decay function (expoDecay), the exponential decay function with self-starter for the nls
function and the exponential decay function with self-starter for the drm
function in the drc package.
expoDecay.fun(predictor, C0, k)
NLS.expoDecay(predictor, C0, k)
DRC.expoDecay(fixed = c(NA, NA), names = c("C0", "k"))
predictor |
a numeric vector of values at which to evaluate the model. |
C0 |
model parameter |
k |
model parameter |
fixed |
numeric vector. Specifies which parameters are fixed and at what value they are fixed. NAs for parameter that are not fixed. |
names |
a vector of character strings giving the names of the parameters. The default is reasonable. |
The exponential decay is given by the following function:
f(x) = \textrm{C0} \cdot \exp (- k x )\}
expoDecay.fun and NLS.expoDecay return a numeric value, while DRC.expoDecay returns a list containing the nonlinear function, the self starter function and the parameter names.
DRC.expoDecay is for use with the function drm
.
Andrea Onofri
Ratkowsky, DA (1990) Handbook of nonlinear regression models. New York (USA): Marcel Dekker Inc.
Onofri, A. (2020). A collection of self-starters for nonlinear regression in R. See: https://www.statforbiology.com/2020/stat_nls_usefulfunctions/
data("degradation")
model <- drm(Conc ~ Time, fct = DRC.expoDecay(),
data = degradation)
summary(model)
model2 <- nls(Conc ~ NLS.expoDecay(Time, a, b),
data = degradation)
summary(model2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.