search for: cumsm

Displaying 2 results from an estimated 2 matches for "cumsm".

Did you mean: cumm
2008 Nov 26
1
Finding Stopping time
...first stopping index was 5. I want to set 6th observation from the generated normal variables as the first random number, and I stop at second stopping index. This is my code, alpha <- 0.05 beta <- 0.07 a <- log((1-beta)/alpha) b <- log(beta/(1-alpha)) theta1 <- 2 theta2 <- 3 cumsm<-function(n) {y<-NULL for(i in 1:n) {y[i]=x[i]^2} s=sum(y) return(s) } psum <- function(p,q) {z <- NULL for(l in p:q) { z[l-p+1] <- x[l]^2}...
2009 Mar 09
5
Help
...t; the generated normal variables as the first random > number, and I stop at second stopping index. > > This is my code, > > > alpha <- 0.05 > beta <- 0.07 > a <- log((1-beta)/alpha) > b <- log(beta/(1-alpha)) > theta1 <- 2 > theta2 <- 3 > > cumsm<-function(n) > {y<-NULL > for(i in 1:n) > {y[i]=x[i]^2} > s=sum(y) > return(s) > } > psum <- function(p,q) > {z <- NULL > for(l in p:q) >...