Divide stimuli in a List Object, assign stimuli to two blocks

102 views
Skip to first unread message

bah3...@gmail.com

unread,
Jun 12, 2017, 3:58:13 PM6/12/17
to E-Prime
My goal is to divide a list of stimuli into two blocks randomly each time a participant is run.
I think I am very close to coding it, but I am having some trouble with performing operations on that initial undivided list.  
I could . . .
(1) read in levels from a .txt file (but not create a List Object with them), assign them to an array, and then randomly assign stimuli from the array to the two block lists
(2) create one CompleteList with all the levels at the beginning of the experiment and then divide the stimuli randomly

For option (1), I cannot find the appropriate code.

For option (2), when I created a CompleteList List Object without assigning a procedure to each level, E-Prime said I needed a procedure, so I tried creating a Division Procedure in my SessionProc.  It looked like this: 
> SessionProc 
          > TheDivision (says to run TheDivisionProc Procedure) 
                    > TheDivisionProc 
                              > CompleteList
                              > DivideStimuliScript (copy the items into an array, randomize them, and then assign them to the two blocks of my experiment)
          > BlockList
                    > Block1
                    > Block 2
Unfortunately, assigning TheDivisionProc as the Procedure for items in CompleteList resulted in a recursive loop; assigning SessionProc had the same effect.

Any help you can provide with implementing option (1) or (2) would be greatly appreciated.

David McFarlane

unread,
Jun 12, 2017, 4:07:34 PM6/12/17
to e-p...@googlegroups.com
Have you worked through the Nested List examples in Appendix C of the
User's Guide that came with E-Prime? Give that a try first and see if
it gives you any ideas. You should be able to do this with no inline
code at all.

-- David McFarlane

bah3...@gmail.com

unread,
Jun 12, 2017, 4:32:26 PM6/12/17
to E-Prime
I see what you mean, but there's a little more to my question.

My stimuli are arranged in groups of 4 (the result of a 2X2 cross).  For example, I have

ID  . . . Scene     TheObject     Group
1 . . . Scene1     Object1            1
2 . . . Scene2     Object1            1
3 . . . Scene1     Object2            1
4 . . . Scene2     Object 2           1
5 . . . Scene3     Object3            2
6 . . . Scene4     Object3            2
7 . . . Scene3     Object4            2
8 . . . Scene4     Object4            2

I want to make sure that all four combinations are assigned to the same block.  My plan is to assign the levels to an array, randomize the order while keeping the items in the same group together, THEN send the ones with an even ID to one BlockList and those with an odd ID to the other BlockList.  The IDs can be used because they (unlike the Group attribute) were randomly assigned.  Alternatively, I could assign the levels to an array, THEN send the ones with an even ID to one BlockList and those with an odd ID to the other BlockList, THEN display them randomly such that no two from the same group appear consecutively.

bah3...@gmail.com

unread,
Jun 12, 2017, 5:13:22 PM6/12/17
to E-Prime
Currently, I am trying this structure, as suggested by https://groups.google.com/d/msg/e-prime/eWplk1ghnjE/_cY3-VOKzqYJ:
> SessionProc
          >InLineScript: Get the stimuli
CompleteList.LoadMethod=ebLoadMethodFile
CompleteList.Filename="StimuliInTabDelimited.txt"
CompleteList.Load
          > CompleteList (an empty List Object with the attribute labels I need)
          > InLineScript: DivideTheStimuli (CompleteList.Reset and then my division code)
          > BlockList
                    > Block1
                    > Block 2

I keep getting Error -999: "Can't find procedure definition."
Am I on the right track?  
Reply all
Reply to author
Forward
0 new messages