SSgmicmen: self start for a generalized Michaelis-Menten function

SSgmicmenR Documentation

self start for a generalized Michaelis-Menten function

Description

Self starter for a Michealis-Menten function with parameters

Usage

gmicmen(x, y0, ymax, c, k)

SSgmicmen(x, y0, ymax, c, k)

Arguments

x

input vector

y0

the lowest value

ymax

the maximum value

c

parameter controlling the shape of the function

k

parameter controlling the time for maximum value

Details

# This is a modification of an equation that appears in the paper in the details. # It is not clear how useful it is.

Source: A generalized Michaelis-Menten equation for the analysis of growth. Lopez et al. J. Anim. Sci. 2000. 78:1816-1828.

Value

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

gmicmen: vector of the same length as x using the modified Michaelis-Menten function

Examples


require(ggplot2)
set.seed(123)
x <- 1:30
y <- gmicmen(x, 1, 10, 0.7, 10) + rnorm(30, 0, 0.01)
dat <- data.frame(x = x, y = y)
fit <- nls(y ~ SSgmicmen(x, y0, ymax, c, k), data = dat)
## plot
ggplot(data = dat, aes(x = x, y = y)) + 
  geom_point() + 
  geom_line(aes(y = fitted(fit)))
## Confidence intervals
confint(fit)

## Different value for c
y <- gmicmen(x, 1, 10, 5, 10) + rnorm(30, 0, 0.01)
dat <- data.frame(x = x, y = y)
fit <- nls(y ~ SSgmicmen(x, y0, ymax, c, k), data = dat)
## plot
ggplot(data = dat, aes(x = x, y = y)) + 
  geom_point() + 
  geom_line(aes(y = fitted(fit)))
## Confidence intervals
confint(fit)



nlraa documentation built on Aug. 21, 2025, 5:59 p.m.