cv_test = function(x,y) {
  CV = sqrt(chisq.test(x, y, correct=FALSE)$statistic /
    (length(x) * (min(length(unique(x)),length(unique(y))) - 1)))
 print.noquote("Cramér V / Phi:")
  return(as.numeric(CV))
}

+ Recent posts