fitdecay1: Fit one phase exponential decay data.

Description Usage Arguments Value Examples

View source: R/fitdecay1.R

Description

Based on the one phase exponential decay model 'y=range*exp(-k*x)' where range = yhi-ylo. The regression formula is: 'y ~ (yhi-ylo)*exp(-1*k*x) + ylo“

Usage

1
fitdecay1(x, y, data, k, ylo, yhi, weigh)

Arguments

x

is a vector of non-exponential linear scale values, usually representing time.

y

is a vector of y values for x, usually responses.

data

is a dataframe with x and y.

k

the rate constant, expressed in reciprocal of the X axis units. When time, the half-life is 0.6932/k.

ylo

the lowest y value, or the value at infinite times, expressed in the same units as Y.

yhi

the highest y value, or the starting value, expressed in the same units as Y.

weigh

chooses regression weighting by 1/y^2. Default = FALSE.

Value

nls

Examples

1
# fitdecay1(x=Time, y=Response, data=decay1ex, k=0.2, ylo=1, yhi=100, weigh=T)

TJMurphy/nlfitr documentation built on March 18, 2021, 12:33 p.m.