Has anyone implemented the Mantel statistical test in Pipeline Pilot? This is a test of the
similarity (correlation) between two distance matrices of the same rank. Apparently the R
stats package, ade4, can perform this test, but it is not clear to me how to load the two
matrices, and obtain useful output i.e., the P value given a specified number of permutations.
Does anyone have either PP code or an R custom script example that they can share.
Thank you.
Regards,
Jim Metz

Hi Jim,
Attached is an example.
I found it quite slow, with this small dataset, so it may be quite long for bigger dataset.
The input is two data already as distance matrices, then a tag is put to value 1 or somehting else to make the distinction between the 2 matrices.
The output of the R component is the coefficient and the pvalue. I used the ade4 library.
(I took some codes from the MDS component already in PP to get how the distance matrices are used)
As usual, it may break and I may come back with something more robust, depending of time.
Cheers
Jérémy
Hi Jim and Jeremy,
Try out this protocol.
I have simply adapted what is in this link http://www.ats.ucla.edu/stat/r/faq/mantel_test.htm and fine tuned it to PP
Hope it helps.
Anand
Jeremy and Anand,
Thank you both for your contributions and quick response.
Jeremy, your example protocol was especially helpful, simple, and clear. I was puzzled
as to how to "feed in" two separate distance matrices, but, again your example is
easy to follow and worked just fine after I installed the ade4 R contrib package. Thanks again.
Regards,
Jim Metz
AbbVie