search for: countschisq

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

2010 Feb 05
1
Appending results via for loop
...s1$Count) } a <- 0 b <- 0 alpha <- .05 n <- window pval <- qchisq((1-(alpha / n)), 1) results <- c(seq(1,size,window)) loop <- 1 for (i in seq(1,size,window)) { a <- i b <- i + window - 1 countsavg <- (sum(abs(counts2$Count[a:b] - counts1$Count[a:b])))/length(a:b) countschisq <- ((abs(((counts2$Count[a:b] - counts1$Count[a:b])-countsavg))^2)/countsavg) results[loop] <- countschisq loop <<- loop + 1 } I'm guessing I'll be getting rid of the loop variable and the 'per index' assignment thing, but I'm not sure what to do. Also, I'd l...