A utility function to generate permutations

.PermutedVar(simulated.refCor, clusterCut, permutations, refClusterVar)

Arguments

simulated.refCor

Correlation matrix of simulated and reference data

clusterCut

The original cluster assignments

permutations

The number of permutations

refClusterVar

Reference Cluster Variance

Value

An array of dimension n.models by nClusters by permutations