exp_decay {OptimModel} | R Documentation |
Three-parameter exponential decay, gradient, starting values, and back-calculation functions
Description
Three-parameter exponential decay, gradient, starting values, and back-calculation functions.
Usage
exp_decay(theta, x)
Arguments
theta |
Vector of three parameters: (A, B, k). See details. |
x |
Vector of concentrations. |
Details
The three-parameter exponential decay model is given by:
y = A + B \times \exp(-Kx).
The parameter vector is (A, B, k) where
A =\min y
( minimum y value), A + B = \max y
(maximum y value), and K = \exp(k)
whichi is the shape parameter.
Value
Let N = length(x). Then
exp_decay(theta, x) returns a numeric vector of length N.
attr(exp_decay, "gradient")(theta, x) returns an N x 3 matrix.
attr(exp_decay, "start")(x, y) returns a numeric vector of length 3 with starting values for (A, B, k).
attr(exp_decay, "backsolve")(theta, y) returns a numeric vector of length=length(y).
Author(s)
Steven Novick
See Also
Examples
set.seed(123L)
x = 2^(-4:4)
theta = c(25, 75, log(3))
y = exp_decay(theta, x) + rnorm( length(x), mean=0, sd=1 )
attr(exp_decay, "gradient")(theta, x)
attr(exp_decay, "start")(x, y)
attr(exp_decay, "backsolve")(theta, 38)