Hello! I have a memory experiment in which each participant will study 20 unique word-lists (each list composed of 15 unique words) and attempt to recall as many of the words as they can from the just-presented list after they study that particular list.
I currently have a routine for each word presentation (and one loop the create each list and another loop to create each participant’s list of lists). But, how can I feed in the exact list of words each participant should see to my study?
What did I try to make it work?: I am thinking that I could have a pre-made excel file with two columns “Words” and “List Number” for each participant. I can use the list number to assign words to different lists and words can then appear sequentially in each list. However, I couldn’t figure out how to loop through participants’ word list excel files and assign each word correctly to its corresponding list yet. As a first time psychopy user, I’d appreciate any insights/tips/suggestions. Thank you very much in advance for your help!
Please specify exactly what you want to achieve in terms of your design (think how you would express it in the methods section of a paper, rather than the implementation details of lists and loops).
Thank you for your reply. Let me try it again
I would like every participant to study and attempt to recall a total of 300 unique words. For any given participant, these 300 words will be divided into 20 lists (and thus each list will be composed of presentation of 15 words followed by a recall period).
I am looking for a way to input these participant-specific 300 words into my study (rather than using a common pool of words for all participants).
Go to the experiment settings dialog and add a field to the “Experiment info” dialog that gets shown at the beginning of every session. Give it a name like “words_file” and give it a default value that will be a hint as to how your files are named (e.g. subject_01_words.csv) On every run of the experiment, you will need to specify here the name of the file that contains the list of 300 words for the current subject.
In the loop controlling your trials, put this in the “Conditions” field: $expInfo['words_file'] i.e. now, rather than hard-coding the name of the file to be used, the experiment will look up what you put in the experiment info dialog.
Your loop should contain two routines, one for showing the stimuli and one for doing the recall task.
You want the recall routine to only run on every 15th stimulus. So on that routine, insert a code component (from the “Custom” component panel). In its “Begin routine” tab, put something like this:
The % operator here is the modulo division operator, which returns the remainder of the division only. So the routine will run only when the current trial number (plus 1, since the numbers are 0-based) divided by 15 returns a remainder of 0. So the routine will run only when .thisN == 14, 29, 44, …, 299.
So with this approach we are skirting the issue of dividing the 300 words into “sub-lists” per se: I’m just assuming that the overall list of 300 words can be separated by the recall task on every 15th loop iteration. I’m not sure how this fits with the concept of what a “trial” is in this study (is it per word, or per response?). i.e. the data will be recorded as one row per displayed word, with a response recorded only on every 15th row of the data file.
NB the experiment will fail with an error if there is a typo in the name of the file to be used, which is why it is useful to provide a default value to use as a template.