simulLogistic: Logistic growth

View source: R/growth.R

simulLogisticR Documentation

Logistic growth

Description

Simulate phenotypes via the following model (Ma et al (2002)): y(t) = g(t) + epsilon(t) where g(t) = a / (1 + b exp(-r t))) and epsilon(t) ~ N(0, sigma^2).

Usage

simulLogistic(t = 1:20, a = 50, g.t0 = 1, r = 0.6, sigma2 = 0)

Arguments

t

vector of time points

a

asymptotic value of g when t tends to infinity

g.t0

initial value of g at time t = 0

r

relative rate of growth

sigma2

variance of the errors

Value

list

Author(s)

Timothee Flutre

Examples

## Not run: set.seed(1859)
model <- simulLogistic(t=1:20, a=50, g.t0=1, r=0.6, sigma2=1)
plot(x=model$t, y=model$g.t, type="b", las=1, xlab="time (t)", ylab="g(t)",
     main="Logistic without noise")
plot(x=model$t, y=model$y.t, type="b", las=1, xlab="time (t)", ylab="y(t)",
     main="Logistic with noise")

## End(Not run)

timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.