Fred J. wrote:

I need to generate a data set based on this equation
X(t) = 3.8x(t-1) (1-x(t-1)) + e(t), where e(t) is a
N(0,0,001) random variable
I need say 100 values.

How do I do this?





I assume X(t) and x(t) are the same (?).


f<-function (x) { 3.8*x*(1-x) + rnorm(1,0,.001) }
v=c()
x=.1 # starting point
for (i in 1:100) { x=f(x); v=append(v,x) }

There may be smarter ways...

Christophe Pallier

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to