Displaying 1 result from an estimated 1 matches for "col_scores".
2006 Oct 31
0
about mantelhaen.test (PR#7779)
...------
# takes a 3-d array x, scores for rows, and scores for columns
# runs nominal-nominal, ordinal-nominal, and ordinal-ordinal CMH tests
# this function is based on one posted at
# http://bugs.r-project.org/cgi-bin/R/wishlist?id=3D7779;user=3Dguest
mh.test <- function(x, row_scores=3DNULL, col_scores=3DNULL) {
if (length(dim(x)) !=3D 3){
stop("x must be a 3 dimensional array")
}
if (any(apply(x, 3, sum) < 2)){
stop("sample size in each stratum must be > 1")
}
I <- dim(x)[1]; J <- dim(x)[2]; K <- dim(x)[3]
if ( (len...