SSexpoGrowth: Exponential growth function

expoGrowthR Documentation

Exponential growth function

Description

These functions provide the exponential growth function (expoGrowth), the exponential growth function with self-starter for the nls function and the exponential growth function with self-starter for the drm function in the drc package.

Usage

  expoGrowth.fun(predictor, init, k)
  NLS.expoGrowth(predictor, init, k)
  DRC.expoGrowth(fixed = c(NA, NA), names = c("init", "k"))

Arguments

predictor

a numeric vector of values at which to evaluate the model.

init

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.

Details

The exponential growth is given by the following function:

f(x) = \textrm{init} \cdot \exp (k x )\}

Value

expoGrowth.fun and NLS.expoGrowth return a numeric value, while DRC.expoGrowth returns a list containing the nonlinear function, the self starter function and the parameter names.

Note

DRC.expoGrowth is for use with the function drm.

Author(s)

Andrea Onofri

References

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/

Examples

rm(list=ls())
set.seed(1234)
X <- 1:20
Ye <- 3 * exp(0.1 * X)
Y <- Ye + rnorm(20, 0, 0.7)
dataset <- data.frame(X, Y)
rm(X, Y)

model <- drm(Y ~ X, fct = DRC.expoGrowth(),
             data = dataset)
model2 <- nls(Y ~ NLS.expoGrowth(X, a, b),
             data = dataset)
summary(model)
summary(model2)

OnofriAndreaPG/aomisc documentation built on Feb. 26, 2024, 8:21 p.m.