Displaying 1 result from an estimated 1 matches for "cus2".
Did you mean:
cus
2004 Sep 04
0
Non-Markovian Behaviour of a Cusum?
...the mean of Q[i] for each i
Qmean <- rep(NA, maxTime)
Q <- rep(FIR, nSims)
for(i in 1:maxTime){
Q <- pmax(0, Q+rnorm(nSims, mean=offset))
Qmean[i] <- mean(Q)
}
Qmean
}
set.seed(321)
Cus1 <- CusumSim()
plot(Cus1)
# Different simulation, essentially the same behavior
Cus2 <- CusumSim()
plot(Cus1, ylim=range(Cus1, Cus2))
lines(Cus2)
# Different random number generator, same behavior
RNGkind("Wichmann-Hill")
CusWH <- CusumSim()
plot(Cus1, ylim=range(Cus1, Cus2, CusWH))
lines(Cus2)
lines(CusWH, col=2, lty=2, lwd=2)
# Different values for offest, same...