How to do permutations on a matrix to obtain p-values?

I have a matrix of values, determined from several experiments of combining drugs in diseased cells. Results look like a 10 x 10 matrix of drug interaction scores. My goal is to use permutation testing to determine whether a given square o the matrix is statistically significant. Simplified my question is:

How can I use permutations to obtain p-values for every square in my matrix?

A dummy 10 x 10 matrix, where one value is clearly different than other given values of the matrix :

my_mat <- matrix(1:10, nrow=10, ncol=10)
my_mat[5,5] <- 80 #Make one cell clearly different than the rest
ggplot(melt(my_mat), aes(x=Var1, y=Var2, fill=value)) + geom_tile(color="black", size=0.6) + scale_fill_gradient(low="white", high="red")

The result looks like this:

How can I permute this matrix and obtain p-values?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.