simulLogistic | R Documentation |
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).
simulLogistic(t = 1:20, a = 50, g.t0 = 1, r = 0.6, sigma2 = 0)
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 |
list
Timothee Flutre
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.