% perm_id array of permutations, from set of regions to itself (as generated by "rotate_parcellation") array of size [n(total regions) x nrot] nroi = size(perm_id,1 ...
% all_cov_valid: a Z*M matrix (can be empty) % pos_mask: an X*Y matrix with 0 and 1 value % neg_mask: an X*Y matrix with 0 and 1 value % fit_pos_valid: beta value of positive network model (1*2) % fit ...