meddiff | R Documentation |
Compute a matrix of median differences
meddiff(xmat, threshold = 5)
xmat |
A numeric matrix |
threshold |
Numeric scalar, minimum number of pairs needed for computation of a median difference |
A square numeric matrix, with size equal to the number of
columns in xmat
# # Toy example from # https://davidfirth.github.io/blog/2019/04/26/robust-measurement-from-a-2-way-table/ # x <- structure(c(NA, NA, 10, NA, NA, 20, NA, NA, 30, 45, 55, NA, 60, 60, 50), .Dim = c(3L, 5L), .Dimnames = structure(list(student = c("i", "j", "k"), module = c("A", "B", "C", "D", "E")), .Names = c("student", "module"))) print(x) meddiff(x, threshold = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.