Learn R Programming

OptimModel (version 2.0-1)

exp_decay_pl: Three-parameter exponential decay with initial plateau, gradient, starting values, and back-calculation functions

Description

Three-parameter exponential decay with initial plateau, gradient, starting values, and back-calculation functions.

Usage

exp_decay_pl(theta, x)

Value

Let N = length(x). Then

  • exp_decay_pl(theta, x) returns a numeric vector of length N.

  • attr(exp_decay_pl, "gradient")(theta, x) returns an N x 4 matrix.

  • attr(exp_decay_pl, "start")(x, y) returns a numeric vector of length 4 with starting values for (x0, yMax, yMin, k).

  • attr(exp_decay_pl, "backsolve")(theta, y) returns a numeric vector of length=length(y).

Arguments

theta

Vector of four parameters: (x0, yMax, yMin, k). See details.

x

Vector of concentrations.

Author

Steven Novick

Details

The three-parameter exponential decay with initial plateau model is given by \(y = \text{yMax}\) whenever \(x\le 0\) otherwise $$y = \text{yMin} + (\text{yMax}-\text{yMin})\times\exp(-K(x-X0))\text{ if } x > X0,$$

where \(X0 = \exp(x0)\) is an inflection point between plateau and exponential decay curve, \(\text{yMin} = \min y\) (min response), \(\text{yMax} = \max y\) (maximum response), and \(K = \exp(k)\) is the shape parameter.

See Also

optim_fit, rout_fitter

Examples

Run this code
set.seed(100)
x = 2^(-4:4)
theta = c(0.4, 75, 10, log(3))
y = exp_decay_pl(theta, x)  + rnorm( length(x), mean=0, sd=1 )
attr(exp_decay_pl, "gradient")(theta, x)
attr(exp_decay_pl, "start")(x, y)
attr(exp_decay_pl, "backsolve")(theta, 38)

Run the code above in your browser using DataLab