Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

SSexpfp

self start for an exponential-plateau function


Description

Self starter for an exponential-plateau function

Usage

expfp(x, a, c, xs)

SSexpfp(x, a, c, xs)

Arguments

x

input vector (x)

a

represents the value at x = 0

c

represents the exponential rate

xs

represents the breakpoint at which the plateau starts

Details

This is the exponential-plateua function, where ‘xs’ is the break-point

(x < xs) * a * exp(c * x) + (x >= xs) * (a * exp(c * xs))

For more details see: Archontoulis and Miguez (2015) - (doi:10.2134/agronj2012.0506).

Value

a numeric vector of the same length as x containing parameter estimates for equation specified

expfp: vector of the same length as x using the expfp function

Examples

require(ggplot2)
set.seed(12345)
x <- 1:30
y <- expfp(x, 10, 0.1, 15) + rnorm(30, 0, 1.5)
dat <- data.frame(x = x, y = y)
fit <- nls(y ~ SSexpfp(x, a, c, xs), data = dat)
## plot
ggplot(data = dat, aes(x = x, y = y)) + 
  geom_point() + 
  geom_line(aes(y = fitted(fit)))

nlraa

Nonlinear Regression for Agricultural Applications

v0.89
GPL-3
Authors
Fernando Miguez [aut, cre] (<https://orcid.org/0000-0002-4627-8329>), José Pinheiro [ctb, cph] (author of nlme::nlsList, nlme::predict.gnls, nlme::predict.nlme), Douglas Bates [ctb, cph] (author of nlme::nlsList, nlme::predict.gnls, nlme::predict.nlme), R-core [ctb, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.