File Exchange

image thumbnail

QAP test

version 1.0.0.0 (1.21 KB) by Puck Rombach
This is a matrix correlation test called Quadratic Assignment Procedure.

0 Downloads

Updated 24 Mar 2011

View License

This test was described in Mantel (1967) and Hubert/Schultz (1976), see links below. It's a non-parametric, permutation-based test that preserves the integrity of the structures and the mutual dependence of the observations.

The function takes three parameters X, Y and u. X and Y are matrices you wish to compare, and u is the size of the sample of possible permutations of X. If X and Y are adjacency matrices for a network, then permutations used for this test shuffle the order of the nodes only, and hence do not change the network represented by the matrix (entries on the diagonal stay on the diagonal). The total number of possible permutations is n!, which is computationally too large in most cases, and therefore X is randomly permuted u times. The assumption is that the value of D (the sum over X(i,j)*Y(i,j) for all i~=j) is normally distributed.

The output of the function is z, a two-sided normal CDF score for the correlation between X and Y.

Mantel: http://cancerres.aacrjournals.org/content/27/2_Part_1/209.short

Hubert, Schultz: http://psycnet.apa.org/?fa=main.doiLanding&uid=1978-00142-001

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor