## showing randomly paired stimuli again in a second round in the same combination

##### showing randomly paired stimuli again in a second round in the same...
 Author Message AKathryn posted 9 Years Ago ANSWER HOT Group: Forum Members Posts: 4, Visits: 22 Dear Inquisit community,I am currently desingning an experiment in which participants have to evaluate fictional project partners (in terms of how much they would like to work with that person). I am presenting several potential partners, and always show a picture next to a short CV. Attractiveness in the picture varies as well as the competence of the person as suggested in the CV. In the end, the task should measure the value a person places on attractiveness as compared to the competence of a person. Picture and CV are paired randomly, so that every participant gets a different „set“ of potentional project partners.Now the challenge: After showing all the pictures of all project partners, randomly paired with CVs and asking everytime how much the participant would like to work with that person, I want to do ANOTHER round of showing the same pictures paired with the same CVs as before, this time asking the participant how attractive and how competent they perceive the person as a manipulation check.Here is my question: Is it somehow possible for Inquisit to track which combination it randomly showed before and to show this exact combination again in the second round?Thank you so much for your help!Best,Kathryn Dave posted 9 Years Ago ANSWER Group: Administrators Posts: 13K, Visits: 102K Yes, it's perfectly possible. Two options:(1) Pair your items randomly *at the beginning* of the experiment and then proceed as you would normally. See e.g. https://www.millisecond.com/forums/Topic2623.aspx for an example.(2) Store the pairs *at runtime* in empty, linked or elements. Sample from those s or for the repetition. Example:/ personitem = 1/ cvitem = 1/ blocks = [1=showrandompairs; 2=repeatrandompairs]/ trials = [1-4=show]/ trials = [1-4=repeat]/ ontrialbegin = [values.personitem=list.randomperson.nextindex; values.cvitem=list.randomcv.nextindex;    list.repeatperson.appenditem(values.personitem); list.repeatcv.appenditem(values.cvitem); ]/ stimulusframes = [1=person, cv]/ validresponse = (57)/ ontrialbegin = [values.personitem=list.repeatperson.nextvalue; values.cvitem=list.repeatcv.nextvalue; ]/ stimulusframes = [1=person, cv]/ validresponse = (57)/ items = personitems/ select = values.personitem/ position = (40%, 50%)/ items = cvitems/ select = values.cvitem/ position = (60%, 50%)/ 1 = "Person A"/ 2 = "Person B"/ 3 = "Person C"/ 4 = "Person D"/ 1 = "CV 1"/ 2 = "CV 2"/ 3 = "CV 3"/ 4 = "CV 4"/ poolsize = 4/ poolsize = 4/ selectionmode = list.repeatperson.currentindex AKathryn Group: Forum Members Posts: 4, Visits: 22 Okay, thank you, Dave!! I've tried to implement the second method you suggested into my script, but it's not working (I get the error message "Unable to initialize item number 3. Verify the item exists and is correctly defined"Also, I think I didn't do it correctly because the task is actually a bit more complicated than I first described: I am actually not pairing only pictures and CVs but also grades (grade point average) of the "project partner". There are three levels of attractiveness (attractive, medium attractive and unattractive) and three levels of grades (good, medium and bad). Each level of attractiveness is systematically paired with each level of grades, so each participant sees 9 persons in total. Then there are 9 neutral CVs which are assigned randomly to each person/grade pair and also shown simultaneously.So I actually don't have a single trial to show or repeat the "partners", but I made 9 trials for each of the attractiveness/grade combinations. These are selected with the noreplace selectionmode on the block level.I included the "ontrialbegin" commands from your script for each of the 9 trials in my script; is that correct?Also, under the "values" element, I added the three levels of attractiveness and the three levels of grades. Is that correct, too?So sorry, but I'm getting desperate with my script!For clarification, I've attached my script with the added "repeat task" in which I tried to implement your suggestion. I've also added the original script of my task with only the first part of the task, without the second round.Best,Kathryn Attachments partner_choice.exp (590 views, 5.00 KB) partner_choice_mit_repeat_task.exp (856 views, 10.00 KB) Dave posted 9 Years Ago ANSWER Group: Administrators Posts: 13K, Visits: 102K > "Unable to initialize item number 3. Verify the item exists and is correctly defined"Your problem is that the item numbers you assign do not necessarily match the number of available items in your various elements. Your contains item numbers 1-9./ poolsize = 9You sample a random value from that list in your various trials, for example:/ posttrialpause = 250/ stimulustimes = [1 = Person_attractive, grades_set_gut, CV]/ timeout = 5000/ ontrialbegin = [values.Person_attractive=list.randomperson.nextindex; values.CVs=list.randomcv.nextindex;    list.repeatperson.appenditem(values.Person_attractive); list.repeatcv.appenditem(values.CVs); ]Suppose the randomly sampled value is 7. Here's the problem: doesn't have a 7th item. It only has 3 items (#1, #2, #3):/ select = values.Person_attractive/ position = (75, 50)/1 = "face32_w.jpg"/2 = "face31_w.jpg"/3 = "face30_w.jpg"The same is true for the other s / s respectively. You'll thus have to set up more s and sample from those applicable to a given trial-type. I.e. you need to do / poolsize = 3with/ posttrialpause = 250/ stimulustimes = [1 = Person_attractive, grades_set_gut, CV]/ timeout = 5000/ ontrialbegin = [values.Person_attractive=list.randomattractiveperson.nextindex; ...; ]and so forth. AKathryn Group: Forum Members Posts: 4, Visits: 22 Hi Dave!!Thanks again!! I changed my syntax again and I think I did everything correctly. Now there is no error message when I verify the script syntax and when I run it, the first block works fine, however, as soon as the second block (the second round of pictures) is about to start, I get a similar error message again ("Unable to initialize item number 0. Verify the item exists and is correctly defined").I can't figure out what is going wrong.Thanks so much!Unable to initialize item number 3. Verify the item exists and is correctly defined" - See more at: http://www.millisecond.com/forums/Post.aspx?PageIndex=1&Task=PostTopicReply&ParentID=16281#sthash.twyA3T46.dpufUnable to initialize item number 3. Verify the item exists and is correctly defined" - See more at: http://www.millisecond.com/forums/Post.aspx?PageIndex=1&Task=PostTopicReply&ParentID=16281#sthash.twyA3T46.dpuf Attachments partner_choice_mit_repeat_task.exp (778 views, 12.00 KB) Dave posted 9 Years Ago ANSWER Group: Administrators Posts: 13K, Visits: 102K Several problems.#1: Your definitions make no sense (no offense intended):/ selectionmode = list.repeatperson.currentindex/ selectionmode = list.repeatcv.currentindex/ selectionmode = list.repeatgrades.currentindexHow can the selection in list.repeatperson depend on the selection in that very same list.repeatperson? That's circular and won't and shouldn't work. The same is true for the other above lists. #2: The other problem is identical to your initial one. You need separate elements for each "repeat" trial-type (Person1repeat, etc.). I.e. you need to do/ posttrialpause = 250/ stimulustimes = [1 = Person_attractive, grades_set_gut, CV]/ timeout = 5000/ ontrialbegin = [values.Person_attractive=list.randomattractiveperson.nextindex; values.CVs=list.randomcv.nextindex; values.grades_set_gut=list.randomgrades_set_gut.nextindex;    list.repeatperson1.appenditem(values.Person_attractive); list.repeatcvperson1.appenditem(values.CVs); list.repeatgradesperson1.appenditem(values.grades_set_gut); ]with / selectionmode = list.repeatperson1.currentindex/ selectionmode = list.repeatperson1.currentindexand/ posttrialpause = 250/ stimulustimes = [1 = Person_attractive, grades_set_gut, CV]/ timeout = 5000/ ontrialbegin = [values.Person_attractive=list.repeatperson1.nextvalue; values.CVs=list.repeatcvperson1.nextvalue; values.grades_set_gut=list.repeatgradesperson1.nextvalue; ]The same needs to be done for the other trials. AKathryn Group: Forum Members Posts: 4, Visits: 22 Thanks so much!! It's working now. You just made my day :) lir1995 Group: Forum Members Posts: 40, Visits: 190 Hi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test. The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials). The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word. *************************************************Creating Text and Picture Stimuli***********************************************/ items = pracnoun/select = noreplacenorepeat/ position = (50,50)/ fontstyle = ("Arial", 25pt)/ erase = false/select = values.shownword_item/ 1 = "SCOOTER"/ 2 = "CUPCAKE"/ 3 = "TRUMPET"/ 4 = "ZEBRA"/5 = "NOTEBOOK"/6 = "LILY"/1 = "bedroom.jpg"/2 = "library_aisle10.jpg"/3 = "office.jpg"/4 = "dentist1.jpg"/ items = scenes/select = values.pairedscene_item/ shownword_item = 1/ pairedscene_item = 1/ poolsize = 4/ poolsize = 4/ selectionmode = list.word2.currentindex/ p1 = 0/ p2 = 0/ p3 = 0/ p4 = 0/ items = scenes/ select = values.p1/ position = (50%, 50%)/ size = (60%, 60%)/ items = scenes/ select = values.p2/ position = (50%, 50%)/ size = (60%, 60%)/ items = scenes/ select = values.p3/ position = (50%, 50%)/ size = (60%, 60%)/ items = scenes/ select = values.p4/ position = (50%, 50%)/ size = (60%, 60%)/ select = noreplace(1-4)/ selectionrate = always/ resetinterval = 0/ color = white/ shape = rectangle/ size = (100%, 100%)/ erase = false/ items = ("Yes")/ position = (70%, 80%)/ size = (30%, 5%)/ hjustify = center/ vjustify = center/ fontstyle = ("Arial", 18pt)/ txbgcolor = white/ erase = false/ items = ("No")/ position = (30%, 80%)/ size = (30%, 5%)/ hjustify = center/ vjustify = center/ fontstyle = ("Arial", 18pt)/ txbgcolor = white/ erase = false*************************************************Creating Trials*************************************************/ stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard/ ontrialbegin = [values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex;  list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ]/ stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard/ ontrialbegin = [    values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex;  list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ]/ stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard/ stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard*************************************************Creating Blocks*************************************************/ onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue]/ trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice]/ onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue]/ trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4]/ ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;]/ stimulustimes = [0 =scene1, pracnoun]/ validresponse = ("m", "n")/ posttrialpause = 500/ timeout = 5000/ beginresponsetime = 0/ trials = [1-6 = source]/ blocks = [1 = practice; 2 = source_mem] Attachments bedroom.jpg (279 views, 23.00 KB) library_aisle10.jpg (267 views, 251.00 KB) office.jpg (270 views, 35.00 KB) dentist1.jpg (268 views, 132.00 KB) Dave posted 3 Years Ago ANSWER Group: Administrators Posts: 13K, Visits: 102K +x lir1995 - 3/16/2021Hi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test. The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials). The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word. *************************************************Creating Text and Picture Stimuli***********************************************/ items = pracnoun/select = noreplacenorepeat/ position = (50,50)/ fontstyle = ("Arial", 25pt)/ erase = false/select = values.shownword_item/ 1 = "SCOOTER"/ 2 = "CUPCAKE"/ 3 = "TRUMPET"/ 4 = "ZEBRA"/5 = "NOTEBOOK"/6 = "LILY"/1 = "bedroom.jpg"/2 = "library_aisle10.jpg"/3 = "office.jpg"/4 = "dentist1.jpg"/ items = scenes/select = values.pairedscene_item/ shownword_item = 1/ pairedscene_item = 1/ poolsize = 4/ poolsize = 4/ selectionmode = list.word2.currentindex/ p1 = 0/ p2 = 0/ p3 = 0/ p4 = 0/ items = scenes/ select = values.p1/ position = (50%, 50%)/ size = (60%, 60%)/ items = scenes/ select = values.p2/ position = (50%, 50%)/ size = (60%, 60%)/ items = scenes/ select = values.p3/ position = (50%, 50%)/ size = (60%, 60%)/ items = scenes/ select = values.p4/ position = (50%, 50%)/ size = (60%, 60%)/ select = noreplace(1-4)/ selectionrate = always/ resetinterval = 0/ color = white/ shape = rectangle/ size = (100%, 100%)/ erase = false/ items = ("Yes")/ position = (70%, 80%)/ size = (30%, 5%)/ hjustify = center/ vjustify = center/ fontstyle = ("Arial", 18pt)/ txbgcolor = white/ erase = false/ items = ("No")/ position = (30%, 80%)/ size = (30%, 5%)/ hjustify = center/ vjustify = center/ fontstyle = ("Arial", 18pt)/ txbgcolor = white/ erase = false*************************************************Creating Trials*************************************************/ stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard/ ontrialbegin = [values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex;  list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ]/ stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard/ ontrialbegin = [    values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex;  list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ]/ stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard/ stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard*************************************************Creating Blocks*************************************************/ onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue]/ trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice]/ onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue]/ trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4]/ ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;]/ stimulustimes = [0 =scene1, pracnoun]/ validresponse = ("m", "n")/ posttrialpause = 500/ timeout = 5000/ beginresponsetime = 0/ trials = [1-6 = source]/ blocks = [1 = practice; 2 = source_mem]> Given that each image is in it's own picture elementIs there a specific reason you set it up that way to begin with? If so, what is that reason? lir1995 Group: Forum Members Posts: 40, Visits: 190 +x Dave - 3/17/2021+x lir1995 - 3/16/2021Hi, I was hoping to adapt the code you provided in this forum to fit the needs of my experiment (in inquisit 6). I too would like to present participants with a random item and image pairing, and then later present them with the same pairing for a test. The difference is that I have a set of images that I want to present randomly for each participant. I am able to do this using the values and counter functions, as I also want to repeat the images multiple times within a block (switching back and forth between two images for multiple trials). The trouble I am having is making sure the item and image are paired together and then shown on the screen together during the test portion (labeled as source in my code below). Given that each image is in it's own picture element, I am unsure what item to put in the "stimulustimes" for the source block to show participants the correct image that was paired with the word. *************************************************Creating Text and Picture Stimuli***********************************************/ items = pracnoun/select = noreplacenorepeat/ position = (50,50)/ fontstyle = ("Arial", 25pt)/ erase = false/select = values.shownword_item/ 1 = "SCOOTER"/ 2 = "CUPCAKE"/ 3 = "TRUMPET"/ 4 = "ZEBRA"/5 = "NOTEBOOK"/6 = "LILY"/1 = "bedroom.jpg"/2 = "library_aisle10.jpg"/3 = "office.jpg"/4 = "dentist1.jpg"/ items = scenes/select = values.pairedscene_item/ shownword_item = 1/ pairedscene_item = 1/ poolsize = 4/ poolsize = 4/ selectionmode = list.word2.currentindex/ p1 = 0/ p2 = 0/ p3 = 0/ p4 = 0/ items = scenes/ select = values.p1/ position = (50%, 50%)/ size = (60%, 60%)/ items = scenes/ select = values.p2/ position = (50%, 50%)/ size = (60%, 60%)/ items = scenes/ select = values.p3/ position = (50%, 50%)/ size = (60%, 60%)/ items = scenes/ select = values.p4/ position = (50%, 50%)/ size = (60%, 60%)/ select = noreplace(1-4)/ selectionrate = always/ resetinterval = 0/ color = white/ shape = rectangle/ size = (100%, 100%)/ erase = false/ items = ("Yes")/ position = (70%, 80%)/ size = (30%, 5%)/ hjustify = center/ vjustify = center/ fontstyle = ("Arial", 18pt)/ txbgcolor = white/ erase = false/ items = ("No")/ position = (30%, 80%)/ size = (30%, 5%)/ hjustify = center/ vjustify = center/ fontstyle = ("Arial", 18pt)/ txbgcolor = white/ erase = false*************************************************Creating Trials*************************************************/ stimulustimes = [0 =p1; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard/ ontrialbegin = [values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex;  list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ]/ stimulustimes = [0 =p2; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard/ ontrialbegin = [    values.shownword_item=list.word.nextindex; values.pairedscene_item=list.scene.nextindex;  list.word2.appenditem(values.shownword_item); list.scene2.appenditem(values.pairedscene_item); ]/ stimulustimes = [0 =p3; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard/ stimulustimes = [0 =p4; 1000 = blank; 1500 = pracnoun, belong, nobelong; 4000 = blank]/ validresponse = ("n","m")/ posttrialpause = 1000/ trialduration = 5000/ responseinterrupt = frames/ beginresponsetime = 0/ inputdevice = keyboard*************************************************Creating Blocks*************************************************/ onblockbegin = [values.p1=counter.items.selectedvalue; values.p2=counter.items.selectedvalue]/ trials = [1-2 = practice; 3-4 = practice2; 5-6 = practice]/ onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue]/ trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4]/ ontrialbegin = [values.shownword_item=list.word2.nextvalue; values.pairedscene_item=list.scene2.nextvalue;]/ stimulustimes = [0 =scene1, pracnoun]/ validresponse = ("m", "n")/ posttrialpause = 500/ timeout = 5000/ beginresponsetime = 0/ trials = [1-6 = source]/ blocks = [1 = practice; 2 = source_mem]> Given that each image is in it's own picture elementIs there a specific reason you set it up that way to begin with? If so, what is that reason?Thanks for asking. The reason is 2 fold (and I'll use this block as an example) / onblockbegin = [values.p3=counter.items.selectedvalue; values.p4=counter.items.selectedvalue]/ trials = [1-4 = image3; 5-8 = image4; 9-12 = image3; 13-16 = image4]1) I need it so that participants are switching back and forth between the same two images (so both image 3's are the same image despite switching to a new image in between) 2) ideally it would be nice that the images are also randomized such that any two images have a random likelihood of occurring in the mid_same condition. I want this to occur so that any effects I see are based on the condition and not the images shown. However, if there is a better way to do this that would be greatly appreciated!

#### Merge Selected

Merge into selected topic...

Merge into merge target...

Merge into a specific topic ID...

#### Login

 Login Remember Me Reset Password Resend Validation Email