+xDear all,
I'm back here on the forum, after some self-study and time away, with what is likely a simple inquiry.
I'm trying to add a "training session" at the beginning of my experiment but am missing something. I have images with coinciding text to appear below each image that I want to present to subjects to make sure they are familiar with the image, text, and thus the lexical item I am associating with each image.
In the training phase, I want two images to appear (side by side) with text defining the image below. I think I've accomplished that without issue. Next, an audio file plays that matches one of the images. Participants are to select (using the keyboard...later an input device) the correct image/word. I think I've made the following mistakes but can't figure out how to correct them:
1. I'm not assigning the correct value to the item that is "correct" (thus recorded data is erroneous)
2. I don't have the script correctly written to always show two different images. (e.g. when I ran it once I got "banana" on both the left and right of the screen)...
I should probably just stare at it a bit longer to figure it out but I seem to be stuck so I thought I'd throw out a cry for help. Any assistance provided will be much appreciated. My script is attached.
Regards
Jason
Re. #1
<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
]
/ ontrialbegin = [
if (values.
correcth == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]
/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>
ought to read
<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
]
/ ontrialbegin = [
if (values.
correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]
/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>
if I'm understanding the intent correctly.
Re. #2: I don't understand why you ordered the items as you did.
I.e. why are the items flipped?
<item pictureitemstraintT>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
...
/ 9 = "tree.jpg"
/10 = "car.jpg"
</item>
<item pictureitemstrainF>
/ 1 = "cat.jpg"
/ 2 = "dog.jpg"
...
/ 9 = "car.jpg"
/10 = "tree.jpg"
</item>
Note that this achieves nothing of any consequence. The two <picture> elements are entirely *independent*, they both simply sample from their items randomly without replacement (the default behavior). Nothing prevents <picture mypicturetrainT> and <picture mypicturetrainF> from both randomly selecting the item "cat" in a given trial.
If you want to prevent that, you ought to make sure that the two <picture> elements are sampling from the same, single pool of items without replacement. The way to do this is via a <list>:
<values>
/ trainFitem = 1
/ trainTitem = 1
</values>
<trial trainingsession>
/ ontrialbegin = [
values.correcttrain = list.hpos.nextvalue;
values.distractortrain = list.hpos.nextvalue;
values.trainTitem = list.trainingitems.nextindex;
values.trainFitem = list.trainingitems.nextindex;]
/ ontrialbegin = [
if (values.correcttrain == 30%) values.target = parameters.responsekeyleft else values.target = parameters.responsekeyright;
]
/ stimulustimes = [0= clearscreen; 400=mypicturetrainT, mypicturetrainF; 450=correctopiontrain, distractoroptiontrain; 1200=mysoundtrain]
/ inputdevice = keyboard
/ validresponse = (parameters.responsekeyleft, parameters.responsekeyright)
/ correctresponse = (values.target)
/ recorddata = true
</trial>
<list trainingitems>
/ poolsize = 10
/ selectionrate = always
</list>
<picture mypicturetrainT>
/ items = pictureitemstrain
/ hposition = values.correcttrain
/ select = values.trainTitem
</picture>
***********traning pictures false***********
<picture mypicturetrainF>
/ items = pictureitemstrain
/ hposition = values.distractortrain
/ select = values.trainFitem
</picture>
<item pictureitemstrain>
/ 1 = "dog.jpg"
/ 2 = "cat.jpg"
/ 3 = "apple.jpg"
/ 4 = "house.jpg"
/ 5 = "ball.jpg"
/ 6 = "banana.jpg"
/ 7 = "boat.jpg"
/ 8 = "snail.jpg"
/ 9 = "tree.jpg"
/10 = "car.jpg"
</item>
<text correctopiontrain>
/ items = correctitems
/ select = values.trainTitem
/ vposition = 75%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.correcttrain
</text>
<item correctitems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>
<text distractoroptiontrain>
/ items = distractoritems
/ select = values.trainFitem
/ vposition = 75%
/ fontstyle = ("Courier", parameters.fontheight, false, false, false, false, 5, 1)
/ hposition = values.distractortrain
</text>
<item distractoritems>
/ 1 = "Dog"
/ 2 = "Cat"
/ 3 = "Apple"
/ 4 = "House"
/ 5 = "Ball"
/ 6 = "Banana"
/ 7 = "Boat"
/ 8 = "Snail"
/ 9 = "Tree"
/ 10 = "Car"
</item>
<sound mysoundtrain>
/ items = sounditems
/ select = values.trainTitem
/ erase = false
</sound>
<item sounditems>
/ 1 = "dog.wav"
/ 2 = "cat.wav"
/ 3 = "apple.wav"
/ 4 = "house.wav"
/ 5 = "ball.wav"
/ 6 = "banana.wav"
/ 7 = "boat.wav"
/ 8 = "snail.wav"
/ 9 = "tree.wav"
/ 10 = "car.wav"
</item>
P.S.: In the future, if your script requires external files -- images, audio files, etc. -- please include those by putting the script and all the files in a ZIP archive and attaching the archive to your post.