Re: problem with designing quota sampling algorithm



Diederick Niehorster wrote:
Dear All,

I've made a couple of different attempts at solving the problem described below. so far no luck.

Problem example:
I have 80 subjects and 10 stimuli. I want every subject to see 5 stimuli and I want the amount of subjects that sees a stimulus to be equal for all (that would be (5/10)*80=40 subjects that get to see each stimulus). Subjects cannot see the same stimulus twice.
I want to pregenerate a presentation setup for this example (just like S1 sees 1,9,3,4,8; S2 9,3,7,4,2; etc).

....

Just a some thought although no time to pursue in any more depth just now--

nchoosek(10,5) --> 252 is the total number of possibilities.

nchoosek([1:10],5) will return any array holding all of those combinations. Selecting from this array judiciously could get you the results you need????

Does that give you any other ideas, perhaps?

--
.