nsteinme / steinmetz-et-al-2019

Code accompanying Steinmetz et al., 2019
GNU General Public License v3.0
55 stars 14 forks source link

choiceProbShuf shuffle confusing #9

Open RikkelBob opened 3 weeks ago

RikkelBob commented 3 weeks ago

The choiceProbShuf function describes its inputs as follows:

% shufLabels is a cell array with one entry per condition that appears in trialCondition. % Each cell is a matrix size nx x nshuf, each column a random permutation of integers % from 1:nx. First column of shufLabels should be exactly 1:nx. nx is the number of "true" % choices for that condition, and nshuf is the number of shuffle controls desired (e.g. 1000)

nx is defined as the number of true choices for a certain condition, and the permutations are described as a permutation of 1:nx. This results in a matrix where each column contains the exact same values, only shuffled. Would this not also result in an equal sum of ranks for each shuffle, i.e., the numerator returned by mannWhitneyUshuf is the same for each shuffle? Would we not need to include the indices of "false" trials to get the correct shuffled distribution?

Pardon me if I'm misinterpreting, I'm trying to write a python version of this but seem to be stuck here. Any help would be greatly appreciated.