R/linear_rank_test_statistic.R

Defines functions linear_rank_test_statistic

linear_rank_test_statistic <- function(x, y) {
  # x: a vector of counts
  # y: a vector of scores
  # Returns the linear rank test statistic
  # The sum of the products of the counts and the scores
  sum(x * y)
}

Try the contingencytables package in your browser

Any scripts or data that you put into this service are public.

contingencytables documentation built on Sept. 11, 2024, 6:20 p.m.