search for: cusumsim

Displaying 1 result from an estimated 1 matches for "cusumsim".

2004 Sep 04
0
Non-Markovian Behaviour of a Cusum?
...this in both S-Plus 6.1 and R 1.9.1 with apparently independently programmed versions of this with different seeds and different random number generators, and I got a hint of this behavior in a small sample test in Excel. What am I missing? Thanks, spencer graves ##SCRIPT: CusumSim <- function(offset=-0.1, FIR=4.5, maxTime=500, nSims=10000){ # Simulate nSims simultaneous Cusums of length maxTime # Q[i] <- max(0, Q[i-1]+z[i]), z[i] ~ N(offset, 1), # Q[0] = FIR # Store only the mean of Q[i] for each i Qmean <- rep(NA, maxTime) Q <- rep(FIR, nSims) for(i in 1:m...