Displaying 1 result from an estimated 1 matches for "totmean".
Did you mean:
tmean
2005 Sep 08
0
Effect of data set size on calculation
...GC
data. The code is shown below:
# ANOVA 2D GC analysis
# maxc <- number of samples
# nreps <- number of samples
maxc <- 2
nreps <- 4
sscl <- NULL
cmean <- NULL
#
# Initial stat. variable
#
dftot <- nrow(mat)-1
dfcl <- maxc - 1
dferr <- dftot - dfcl
totmean <- mean(mat)
sstot <- sd(mat)^2*dftot
#
# Calculate class-to-class variance
#
for (j in 1:maxc) {
cmean <- rbind(cmean,mean(mat[((j-1)*nreps+1):((j-1)*nreps+nreps),]))
}
for (j in 1:ncol(mat)) {
cmean[,j] <- cmean[,j]-totmean[j]
}
cmean <- (cmean)^2*nreps
for (i in 1:...