Displaying 1 result from an estimated 1 matches for "n_thresh".
2013 Feb 12
3
improving/speeding up a very large, slow simulation
...] <- project.n + verifier.plot.number[i]
}
#running mean
X_bar <- rep(1,n)
for(i in 1:n){
X_bar[i]<- mean(verification.plots[1:i])
}
#running sd
sd2 <- NULL
for(i in 2:n){
sd2[i]<-sd(verification.plots[1:i])
}
#Tn
Tn<-NULL
for(i in 2:n){
Tn[i] <- project.mean-X_bar[i]
}
#n_Threshold
n_thresh<-NULL
for(i in 2:n){
n_thresh[i] <- (((a^2)/(d^2))*((project.sd^2)+(sd2[i]^2)))
}
#Upper
upper <- NULL
for (i in 2:n){
upper[i] <- Tn[i]-d
}
#Lower
lower<- NULL
for(i in 2:n){
lower[i] <- Tn[i]+d
}
#Success.fail
success.fail <- NULL
success.fail.num <- rep(...