Group: Administrators
Posts: 13K,
Visits: 104K
|
Here's what I would do:
- Pair your wordlists with the desired lags similar to what is already the case in the original script. For the sake of example, suppose you have 4 wordlists (1-4) and 3 lag levels (2,4,6), and you want each lag level to occur in each wordlist once (i.e., 4x3 combinations:
<values> / wordlist = 0 / lag = 0 / listitem = 0 </values>
<block myblock> / trials = [1-12=mytrial] </block>
<trial mytrial> / ontrialbegin = [values.wordlist=list.wordlist.nextvalue; values.lag=list.lag.nextvalue; ] / stimulusframes = [1=mytext] / validresponse = (57) </trial>
<text mytext> / items = ("List: <%values.wordlist%> | Lag: <%values.lag%>") </text>
<list wordlist> / items = (1,2,3,4,1,2,3,4,1,2,3,4) </list>
<list lag> / items = (2,2,2,2,4,4,4,4,6,6,6,6) / selectionmode = list.wordlist.currentindex </list>
- Then select your *items* in the subsequent trials based on the value of values.wordlist. To do this set up further lists that hold the item numbers for the items on a given list, e.g.
<list wordlist1items> / items = (1,2,3) </list>
<list wordlist2items> / items = (4,5,6) </list>
<list wordlist3items> / items = (7,8,9) </list>
<item worditems> / 1 = "wordlist 1 item 1" / 2 = "wordlist 1 item 2" / 3 = "wordlist 1 item 3"
/ 4 = "wordlist 2 item 1" / 5 = "wordlist 2 item 2" / 6 = "wordlist 2 item 3"
/ 7 = "wordlist 3 item 1" / 8 = "wordlist 3 item 2" / 9 = "wordlist 3 item 3" </item>
- Sample from the applicable list in your RSVP-stream trials. I.e,
<trial rsvp> / ontrialbegin = [if (values.wordlist==1) values.mystimulus = list.wordlist1items.nextvalue; ] / ontrialbegin = [if (values.wordlist==2) values.mystimulus = list.wordlist2items.nextvalue; ] ... / stimulusframes = [1=stimulus] </trial>
<text stimulus> / items = worditems / select = values.mystimulus ... </text>
|
Group: Forum Members
Posts: 18,
Visits: 107
|
Hi Dave,
So, I have definitely run into a problem at this point. I'll describe what the program is doing first and then I'll include what I hope to be the relevant script.
The script is running the task - a good start - however - the issue I'm now having is that only one word is ever shown from the Target2 word lists - this list being the one that is affected by the changes made to lag. The word that keeps showing is the very first word on the list. My thinking has been that perhaps this is something to do with the conditional statements in one of the main trial sections, but looking at them, I can't really see any issues with them, perhaps you can? The other thing that seems to be a problem (though is less of a problem in the scheme of things) is that a bit of the additional coding that you had written script for seems to be acting on its own in a sense - with saying the number of lags and something else at the end of the script. I think that's the text.mytext part which I'm not entirely sure of the function of in a general sense in fact... I have tried to put in into one of the other trial sections and take out the text bit thinking that might help, but when I do that I seem to run into other problems with how the script runs, so I'm just going to leave it in its current form for you to look at with the other trial sections.
So these are the trial sections where I think the problem might be coming from:
<trial mytrial> / ontrialbegin = [values.wordlist=list.wordlist.nextvalue; values.t1position=values.t2lag=list.lag.nextvalue; ] / stimulusframes = [1=mytext] / validresponse = (57) / branch = [trial.starttrial] </trial>
<trial starttrial> / ontrialbegin = [values.trialnumber += 1; values.currentposition = 0; values.streamstring = ""; values.t1item = ""; values.t2item = ""; text.distractor.resetselection();] / ontrialbegin = [values.t2position = values.t1position + values.t2lag] / stimulusframes = [1=fixation] / trialduration = 2000 / posttrialpause = 250 / validresponse = (noresponse) / recorddata = false / branch = [trial.distractortrial] </trial>
<trial distractortrial> / ontrialbegin = [values.currentposition += 1] /ontrialbegin = [values.t1position==values.currentposition+1 || values.t2position==values.currentposition+1] / ontrialend = [values.streamstring = concat(values.streamstring, text.distractor.currentitem)] / stimulusframes = [1=distractor] / trialduration = 100 / posttrialpause = 100 / validresponse = (noresponse) / recorddata = false / branch = [if (values.currentposition >= values.streamlength) openended.responsetrial] / branch = [if (values.t1position == values.currentposition +1) trial.target1trial else if (values.t2position == values.currentposition +1) trial.target2trial else trial.distractortrial] </trial>
<trial target1trial> / ontrialbegin = [values.currentposition += 1] / ontrialend = [values.streamstring = concat(values.streamstring, text.target1.currentitem)] / stimulusframes = [1=target1] / trialduration = 600 / posttrialpause = 100 / validresponse = (noresponse) / recorddata = false / branch = [if(values.t2position==values.currentposition+1) trial.target2trial else trial.distractortrial] </trial>
<trial target2trial> / ontrialbegin = [values.currentposition += 1] / ontrialbegin = [if (values.wordlist==2) values.t2lag = list.wordlist1items.nextvalue; ] / ontrialbegin = [if (values.wordlist==3) values.t2lag = list.wordlist2items.nextvalue; ] / ontrialbegin = [if (values.wordlist==4) values.t2lag = list.wordlist3items.nextvalue; ] / ontrialbegin = [if (values.wordlist==5) values.t2lag = list.wordlist4items.nextvalue; ] / ontrialend = [values.streamstring = concat(values.streamstring, text.target2.currentitem)] / stimulusframes = [1=target2] / trialduration = 600 / posttrialpause = 100 / validresponse = (noresponse) / recorddata = false / branch = [trial.distractortrial] </trial>
( In the above script, I've deliberately slowed down the timing for targets 1 and 2 to check that they are showing up. I did try to use the debugging that you'd set up previously, but targets one and two weren't registering there for some reason. Also, I'm describing the word groups as 2, 3, 4 and 5 because I wasn't sure whether designating one of them as 1 would interfere with some of the other coding - such as: / ontrialbegin = [values.currentposition += 1] )
Here are some other changes that I've made major changes on the basis of your previous example:
So here I have 4 t1positions, 4 lags, and 4 word lists, with 64 trials in total
<list t1positionlist> / items = (3,4,5,6,3,4,5,6,3,4,5,6,3,4,5,6, 3,4,5,6,3,4,5,6,3,4,5,6,3,4,5,6, 3,4,5,6,3,4,5,6,3,4,5,6,3,4,5,6, 3,4,5,6,3,4,5,6,3,4,5,6,3,4,5,6) / selectionmode = random / replace = false </list>
<list wordlist> / items = (2,3,4,5,2,3,4,5,2,3,4,5,2,3,4,5, 2,3,4,5,2,3,4,5,2,3,4,5,2,3,4,5, 2,3,4,5,2,3,4,5,2,3,4,5,2,3,4,5, 2,3,4,5,2,3,4,5,2,3,4,5,2,3,4,5) / replace = false </list>
<list lag> / items = (1,1,1,1,2,2,2,2,3,3,3,3,8,8,8,8, 1,1,1,1,2,2,2,2,3,3,3,3,8,8,8,8, 1,1,1,1,2,2,2,2,3,3,3,3,8,8,8,8, 1,1,1,1,2,2,2,2,3,3,3,3,8,8,8,8) / selectionmode = list.wordlist.currentindex </list> <text target2> / items = worditems / select = values.t2lag / select = noreplace / fontstyle = ("Verdana", 5%, true) / color = red /txbgcolor = (black) </text>
<list wordlist1items> / items = (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) </list>
<list wordlist2items> / items = (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32) </list>
<list wordlist3items> / items = (33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48) </list>
<list wordlist4items> /items = (49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64) </list>
<text mytext> / items = ("List: <%values.wordlist%> | Lag: <%values.t2lag%>") </text>
If you would like, I could also email you the whole script, I just think at this stage it's fairly likely that the problem is in one or more than one of these areas.
Anyway, I'm really hoping that you can tell me what bits/which bits here are continuing to mess up the program from running as it's intended to. I would very much appreciate the help. :-)
|