Hi everyone,
you might find my question elementary but I am a beginner and unfortunately I
can't fix the problem.
So, I simulate this following algorithm and some values of c are NA. Therefore,
I should add these following two if-statements but I don't know how I should do
it in a for-loop.
Hello everyone,
I'm trying to generate a sequence that consists of random numbers and the
following algorithm works well
###
a <- 0.08
b <- 0.01
T <- 90
t <- 0:T
alpha <- 1
e <- rnorm(T, mean = 0, sd = 0.1)
d <- c( runif(1,0, a*T), rep(0, T-1) )
for (i in 2:T)
{
d[i] <- alpha * d[i-1] +
2 matches
Mail list logo