LTK
|
|
Group: Forum Members
Posts: 15,
Visits: 72
|
+xThe numbers you put before each item (/1, /12, etc.) do not matter and never did. An item's index is always its position in the <item> listing, from top (1) to bottom (2). Item number 1 in the above code of yours is lossQ5.png, the first one listed, and item number 20 is lossQ7.png, the last one listed. If anything, you'll not want to <include> differently ordered <item> elements, but <list>s containing item numbers in different orders and set to sequential selection. https://www.millisecond.com/forums/Topic20057.aspx I'm aware the numbers don't matter, I just figured they could be read out in some way. The <list> function does make things a lot more compact, thanks for that tip. I found a variable list.practiceorder.nextvalue to identify the stimulus, which means I don't have to use the filename, so that's nice.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+xHi, I have a question pertaining to this topic. I also need to present stimuli in a particular order for each participant, and this method works perfectly for that. However, my previous method for identifying which stimulus is presented no longer works here. Namely: if (picture.practicequaddle.nextindex <= 10 ) values.currentcsvalue = parameters.firstcsvalue; else values.currentcsvalue = parameters.secondcsvalue; When I had my stimuli in an ordered <item> list nextindex (and currentlistitem for that matter) corresponded to the place of the stimulus in that list, but apparently they are not actually coupled because now that my <item> list looks like this, it no longer works: <item practicequaddles> / 15 = "lossQ5.png" / 7 = "gainQ7.png" / 19 = "lossQ9.png" / 6 = "gainQ6.png" / 3 = "gainQ3.png" / 14 = "lossQ4.png" / 5 = "gainQ5.png" / 18 = "lossQ8.png" / 13 = "lossQ3.png" / 8 = "gainQ8.png" / 1 = "gainQ1.png" / 12 = "lossQ2.png" / 9 = "gainQ9.png" / 20 = "lossQ10.png" / 4 = "gainQ4.png" / 10 = "gainQ10.png" / 11 = "lossQ1.png" / 16 = "lossQ6.png" / 2 = "gainQ2.png" / 17 = "lossQ7.png" </item> Instead, currentitemnumber always numbers them 1 through 20 sequentially. I had hoped to use the numbers after the slash as a shorthand for the stimulus name, so that I could tell the program to present the first value for each 'gain' stimulus (all numbered 10 and lower) and present the second value for each 'loss' stimulus (all numbered 11 and higher). Is there a way to read out this number from the item list if not with nextindex or currentlistitem? I would prefer to not have to write a statement saying "if (currentitem == "gainQ1.png" || currentitem == "gainQ2.png" || ...)" et cetera. This would be easier with wildcards but I haven't seen any function like that in Inquisit. <item practicequaddles> / 15 = "lossQ5.png" / 7 = "gainQ7.png" / 19 = "lossQ9.png" / 6 = "gainQ6.png" / 3 = "gainQ3.png" / 14 = "lossQ4.png" / 5 = "gainQ5.png" / 18 = "lossQ8.png" / 13 = "lossQ3.png" / 8 = "gainQ8.png" / 1 = "gainQ1.png" / 12 = "lossQ2.png" / 9 = "gainQ9.png" / 20 = "lossQ10.png" / 4 = "gainQ4.png" / 10 = "gainQ10.png" / 11 = "lossQ1.png" / 16 = "lossQ6.png" / 2 = "gainQ2.png" / 17 = "lossQ7.png" </item> The numbers you put before each item (/1, /12, etc.) do not matter and never did. An item's index is always its position in the <item> listing, from top (1) to bottom (2). Item number 1 in the above code of yours is lossQ5.png, the first one listed, and item number 20 is lossQ7.png, the last one listed. If anything, you'll not want to <include> differently ordered <item> elements, but <list>s containing item numbers in different orders and set to sequential selection. https://www.millisecond.com/forums/Topic20057.aspx
|
|
|
LTK
|
|
Group: Forum Members
Posts: 15,
Visits: 72
|
Hi, I have a question pertaining to this topic. I also need to present stimuli in a particular order for each participant, and this method works perfectly for that. However, my previous method for identifying which stimulus is presented no longer works here. Namely: if (picture.practicequaddle.nextindex <= 10 ) values.currentcsvalue = parameters.firstcsvalue; else values.currentcsvalue = parameters.secondcsvalue; When I had my stimuli in an ordered <item> list nextindex (and currentlistitem for that matter) corresponded to the place of the stimulus in that list, but apparently they are not actually coupled because now that my <item> list looks like this, it no longer works: <item practicequaddles> / 15 = "lossQ5.png" / 7 = "gainQ7.png" / 19 = "lossQ9.png" / 6 = "gainQ6.png" / 3 = "gainQ3.png" / 14 = "lossQ4.png" / 5 = "gainQ5.png" / 18 = "lossQ8.png" / 13 = "lossQ3.png" / 8 = "gainQ8.png" / 1 = "gainQ1.png" / 12 = "lossQ2.png" / 9 = "gainQ9.png" / 20 = "lossQ10.png" / 4 = "gainQ4.png" / 10 = "gainQ10.png" / 11 = "lossQ1.png" / 16 = "lossQ6.png" / 2 = "gainQ2.png" / 17 = "lossQ7.png" </item> Instead, currentitemnumber always numbers them 1 through 20 sequentially. I had hoped to use the numbers after the slash as a shorthand for the stimulus name, so that I could tell the program to present the first value for each 'gain' stimulus (all numbered 10 and lower) and present the second value for each 'loss' stimulus (all numbered 11 and higher). Is there a way to read out this number from the item list if not with nextindex or currentlistitem? I would prefer to not have to write a statement saying "if (currentitem == "gainQ1.png" || currentitem == "gainQ2.png" || ...)" et cetera. This would be easier with wildcards but I haven't seen any function like that in Inquisit.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
Preface: I'm still not sure I fully understand your setup and what the perceived problem is. With that said:
> Thus, it would be useful to be able to load up a different file for each block.
As already explained, this is not possible for the reasons outlined in my previous response.
> I'd prefer not to define each as a different type of item.
If I understand you correctly, you would then end up with 16 external text files *per subject*, which hold the items pertaining to a particular block. I'm not sure how that's less tedious or more straightforward than doing something along the lines you outlined:
> I realize another way to do this is to name items of each type according to their block (e.g., <item study1> etc)
> I'm wondering if there is a way within Inquisit to set up something conditional on the current block such that I don't have to define new > items
There is, but it's hardly less work. The fact remains that the crucial information -- which items belong to which block -- needs to be encoded *somewhere*. You can use <list> elements to determine the selection. Again, building on previous examples, you can do:
-- iqx script file --- <include> / precondition = [script.subjectid == 1] / file = "s_01_items.txt" </include>
<include> / precondition = [script.subjectid == 2] / file = "s_02_items.txt" </include>
<expt myexpt> / blocks = [1-2=sequence(study, test)] </expt>
<trial studytrial> / stimulusframes = [1=studytext] / validresponse = (57) </trial>
<trial testrial> / stimulusframes = [1=testtext] / validresponse = (57) </trial>
<text studytext> / items = studyitems / select = list.studylist.nextindex </text>
<text testtext> / items = testitems / select = list.testlist.nextindex </text>
--- file called s_01_items.txt with the following contents --- <list studylist> / poolsize = 4 / selectionmode = sequence </list>
<list testlist> / poolsize = 4 / selectionmode = sequence </list>
<block test> / trials = [1-2 = testtrial] </block>
<block study> / trials = [1-2 = studytrial] </block>
<item testitems> /1="test A" /1="test B"
/1="test C" /1="test D" </item>
<item studyitems> /1="study A" /1="study B"
/1="study C" /1="study D" </item>
--- file called s_02_items.txt with the following contents --- <list studylist> / poolsize = 8 / selectionmode = sequence </list>
<list testlist> / poolsize = 8 / selectionmode = sequence </list>
<block test> / trials = [1-4 = testtrial] </block>
<block study> / trials = [1-4 = studytrial] </block>
<item testitems> /1="test E" /1="test F" /1="test G" /1="test H"
/1="test I" /1="test J" /1="test K" /1="test L" </item>
<item studyitems> /1="study E" /1="study F" /1="study G" /1="study H"
/1="study I" /1="study J" /1="study K" /1="study L" </item>
Subject #1 would get the items "study A" and "study B" in the 1st study block, and the items "test A" and "test B" in the 1st test block. In the 2nd study block, the participant would see "study C" followed by "study D", and "test C" -> "test D" in the 2nd test block.
The situation for hypothetical subject #2 is analogous, only with 4 trials / items per block, administered in the specified order.
|
|
|
sdubrow
|
|
Group: Forum Members
Posts: 26,
Visits: 143
|
The difference between the blocks is that they are associated with different stimulus lists. Specifically, I have 16 blocks. Odd number blocks are associated with one task and even number blocks with another task, each with unique stimuli that need to be presented in a particular order. Within each task, the items are treated the same way (e.g., defined as pictures of the same size, have equal presentation times, etc) and thus I'd prefer not to define each as a different type of item. Currently the odd number blocks are defined as one item type (i.e., <item study> ) and the even number another (i.e., <item test> ). Thus, it would be useful to be able to load up a different file for each block. I realize another way to do this is to name items of each type according to their block (e.g., <item study1> etc) but I'm wondering if there is a way within Inquisit to set up something conditional on the current block such that I don't have to define new items, pictures, instructions, etc for each block.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
> [...] my question is how to load external files conditional on the current block.
That's not possible, nor do I see why you would need it. For <include> to work the condition has to be satisfiable *before* the script ever starts running, i.e., you can only use things that are known *beforehand* such as the provided subject identifier, the type of operating system Inquisit finds itself running on, etc.
Unfortunately, your example does not provide any additional clarity for me. What the difference between "block 1" and "block 2" is remains unclear. Please describe the relevant parts of your procedure in sufficient detail.
|
|
|
sdubrow
|
|
Group: Forum Members
Posts: 26,
Visits: 143
|
Sorry, my question is how to load external files conditional on the current block.
So the logic I'd want is:
if block ==1 <include> / precondition = [script.subjectid == 1] / file = "s_01_items_block1.txt" </include> elseif block ==2 <include> / precondition = [script.subjectid == 1] / file = "s_01_items_blcok2.txt" </include>
The names of the items are the same in the files (because they should be treated the same way by the script) so loading all of them creates a problem. So, I was hoping to load the files based on the block condition being met. Is something like this possible and if so would it be setting the precondition to be / precondition = [block == 1]?
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
> Somewhat relatedly, is there a way to set the lists that are loaded using <include> to be specific to the current block? Is this something the > precondition can do?
I'm not sure what that's supposed to mean. Please clarify. A concrete example based on those already posted in this thread would help.
> Also, can the instructions be set by block? Or is this something that should be included in the loaded files?
Here too, it's not clear what you mean in concrete terms. To clarify: All <include> does is effectively paste the contents of an external file into the script. /precondition allows you to determine *which* external file's contents are to be used based on the specified condition. Those external files can contain as many different things as necessary -- they are not constrained to containing only <block> or <item> elements; they may contain any element you need to vary according to the specified condition, including for example instruction <page> elements.
|
|
|
sdubrow
|
|
Group: Forum Members
Posts: 26,
Visits: 143
|
Great, thanks!
Somewhat relatedly, is there a way to set the lists that are loaded using <include> to be specific to the current block? Is this something the precondition can do?
Also, can the instructions be set by block? Or is this something that should be included in the loaded files?
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
No, the /trials attribute has nothing to do with how stimuli are selected. That's controlled via the respective stimulus element's (<text>, <picture>, etc.) /select attribute. In the examples I gave,
<text mytext> / items = myitems / select = sequence </text>
is what determines stimuli to be presented in the order given in the <item> element.
|
|
|