search for: qp0

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

Did you mean: qp
2005 Aug 04
1
Counterintuitive Simulation Results
...d simulations in S-Plus 6.1, with all six different random number generators in R 1.9.1 and 2.1.1 and with MS Excel. For modest changes in EZ[t] < 0, I get a different asymptote but pretty much the same image. ################################################# simCus5 <- function(mu=-0.1, Qp0=4.5, maxTime=400, nSims=20000){ Qp.mean <- rep(NA, maxTime) Qp.t <- rep(Qp0, nSims) for(i in 1:maxTime){ z.t <- (mu + rnorm(nSims)) Qp.t <- pmax(0, Qp.t+z.t) Qp.mean[i] <- mean(Qp.t) } Qp.mean } set.seed(1) plot(simCus5(Qp0=4.5)) ########################...