search for: countsavg

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

2010 Feb 05
1
Appending results via for loop
...ounts1$Count)) { size <-length(counts2$Count) } else { size <- length(counts1$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 ...