Changing stimuli set across blocks


Author
Message
jgordon
jgordon
New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)
Group: Forum Members
Posts: 5, Visits: 28
Dave - 4/28/2025
jgordon - 4/28/2025
Dave - 4/28/2025
jgordon - 4/28/2025
Apologies if this ends up being a silly issue.

I am currently trying to program part of a task and having a strange issue I cannot work out. I have four sets of stimuli items that make up the total set of stimuli items across the task. In this task there are four identical (at least for the purpose of this explanation) blocks, thus in every block the set of stimuli items is drawn from one of the four sets of stimuli items. I want the set of item for each block to be chosen randomly such that the order of sets of stimuli items is random but every participant sees all four sets of stimuli items once and only once.

I will include the relevant code below to provide further clarification, but my approach so far has been to set a <value> based on a <list> of the different possible item sets at the beginning of each <block>, I then, use a series of IF statements to check what the <value> is set to, and add the corresponding items from that specific item set to two general <item> elements such that they may be drawn upon to create the stimuli for that block. At the end of each block I then clear the general <item> elements.

My issue is that whilst one of the general <item> elements seems to be correctly filling with the items from the correct item set, the other general <item> element fills with items from the first set (first in regard to the order it appears within the series of IF statements). I cannot work out why this is happening, whether it is a simple mistake on my part or rather a misunderstanding of how Inquisit works. My apologies if anything is unclear as I am rather new to Inquisit so am trying to make things as clear as possible but may be missing crucial information. Regardless, as mentioned before I will include the relevant code below and any help would be greatly appreciated.

<item Statement_Compatible_Male_A>
...
</item>

<item Statement_Incompatible_Male_A>
...
</item>

<item Statement_Compatible_Male_B>
...
</item>

<item Statement_Incompatible_Male_B>
...
</item>

<item Statement_Compatible_Female_A>
...
</item>

<item Statement_Incompatible_Female_A>
...
</item>

<item Statement_Compatible_Female_B>
...
</item>

<item Statement_Incompatible_Female_B>
...
</item>

<item Statement_Compatible_A>
</item>

<item Statement_Compatible_B>
</item>

<item Statement_Incompatible_A>
</item>

<item Statement_Incompatible_B>
</item>

<item Statement_Compatible>
</item>

<item Statement_Incompatible>
</item>

<list Statement_Set>
/ items = ("A", "B", "C", "D")
/ replace = false
</list>

<trial Gender_Item_Allocation>
/ ontrialbegin = [
if (values.Gender_RRT == "Male") {
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Male.item(1);
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Male.item(2);
        
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Male.item(1);
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Male.item(2);
        } else {
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Female.item(1);
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Female.item(2);
        
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Female.item(1);
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Female.item(2);
        };    
if (values.Gender_RRT == "Male") {
    
        item.Statement_Compatible_A.item = item.Statement_Compatible_Male_A.item(1);
        item.Statement_Compatible_A.item = item.Statement_Compatible_Male_A.item(2);
        ...;
        
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Male_A.item(1);
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Male_A.item(2);
        ...;
        
        item.Statement_Compatible_B.item = item.Statement_Compatible_Male_B.item(1);
        item.Statement_Compatible_B.item = item.Statement_Compatible_Male_B.item(2);
        ...;
        
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Male_B.item(1);
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Male_B.item(2);
        ...;
        
} else {

        item.Statement_Compatible_A.item = item.Statement_Compatible_Female_A.item(1);
        item.Statement_Compatible_A.item = item.Statement_Compatible_Female_A.item(2);
        ...;
        
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Female_A.item(1);
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Female_A.item(2);
        ...;
        
        item.Statement_Compatible_B.item = item.Statement_Compatible_Female_B.item(1);
        item.Statement_Compatible_B.item = item.Statement_Compatible_Female_B.item(2);
        ...;
        
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Female_B.item(1);
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Female_B.item(2);
        ...;
}]
</trial>

<block Statement_Matched_Test_Block>
/ onblockbegin = [
    values.Statement_Set = list.Statement_Set.nextvalue;
    if (values.Statement_Set == "A") {
        item.Statement_Compatible.item = item.Statement_Compatible_A.item(1);
        item.Statement_Compatible.item = item.Statement_Compatible_A.item(2);
        ...;
        item.Statement_Incompatible.item = item.Statement_Incompatible_A.item(1);
        item.Statement_Incompatible.item = item.Statement_Incompatible_A.item(2);
        ...;
        
    } if (values.Statement_Set == "B") {
    
        item.Statement_Compatible.item = item.Statement_Compatible_B.item(1);
        item.Statement_Compatible.item = item.Statement_Compatible_B.item(2);
        ...;    
        item.Statement_Incompatible.item = item.Statement_Incompatible_B.item(1);
        item.Statement_Incompatible.item = item.Statement_Incompatible_B.item(2);
        ...;    
        
    } if ...
]
/ onblockend = [
    
    item.Statement_Compatible.clearitems();
    item.Statement_Incompatible.clearitems()
]
</block>


Apologies as well for the length, I have tried to exclude everything irrelevant but please let me know if there is anything else required and any help is greatly appreciated.

Cheers.

Impossible to answer or diagnose based on what you provided. Provide code that is actually runnable and shows the issue.

Hi Dave,

Thanks for the reply, have attached a zip file with the script in question. Hopefully this is the best avenue for this, but if it is easier I can instead include the code in the post.

To be more specific about the issue, seeing as all the code is provided. When running the task items will correctly be added to the 'Statement_Incompatible' <item> based upon the set value, but the 'Statement_Compatible' <item> will only ever fill with items from set A regardless of the value.

Hope this added information is helpful, and thanks again.

<text Statement_Compatible>
/ items = Statement_Compatible_A
/ fontstyle = ("Arial", 3.5%)
/ select = noreplacenorepeat
/ txcolor = black
</text>

is pulling from the wrong <item> element.

Yep, sure is. Sorry for the silly issue. :/

Thank you so much
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 107K
jgordon - 4/28/2025
Dave - 4/28/2025
jgordon - 4/28/2025
Apologies if this ends up being a silly issue.

I am currently trying to program part of a task and having a strange issue I cannot work out. I have four sets of stimuli items that make up the total set of stimuli items across the task. In this task there are four identical (at least for the purpose of this explanation) blocks, thus in every block the set of stimuli items is drawn from one of the four sets of stimuli items. I want the set of item for each block to be chosen randomly such that the order of sets of stimuli items is random but every participant sees all four sets of stimuli items once and only once.

I will include the relevant code below to provide further clarification, but my approach so far has been to set a <value> based on a <list> of the different possible item sets at the beginning of each <block>, I then, use a series of IF statements to check what the <value> is set to, and add the corresponding items from that specific item set to two general <item> elements such that they may be drawn upon to create the stimuli for that block. At the end of each block I then clear the general <item> elements.

My issue is that whilst one of the general <item> elements seems to be correctly filling with the items from the correct item set, the other general <item> element fills with items from the first set (first in regard to the order it appears within the series of IF statements). I cannot work out why this is happening, whether it is a simple mistake on my part or rather a misunderstanding of how Inquisit works. My apologies if anything is unclear as I am rather new to Inquisit so am trying to make things as clear as possible but may be missing crucial information. Regardless, as mentioned before I will include the relevant code below and any help would be greatly appreciated.

<item Statement_Compatible_Male_A>
...
</item>

<item Statement_Incompatible_Male_A>
...
</item>

<item Statement_Compatible_Male_B>
...
</item>

<item Statement_Incompatible_Male_B>
...
</item>

<item Statement_Compatible_Female_A>
...
</item>

<item Statement_Incompatible_Female_A>
...
</item>

<item Statement_Compatible_Female_B>
...
</item>

<item Statement_Incompatible_Female_B>
...
</item>

<item Statement_Compatible_A>
</item>

<item Statement_Compatible_B>
</item>

<item Statement_Incompatible_A>
</item>

<item Statement_Incompatible_B>
</item>

<item Statement_Compatible>
</item>

<item Statement_Incompatible>
</item>

<list Statement_Set>
/ items = ("A", "B", "C", "D")
/ replace = false
</list>

<trial Gender_Item_Allocation>
/ ontrialbegin = [
if (values.Gender_RRT == "Male") {
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Male.item(1);
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Male.item(2);
        
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Male.item(1);
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Male.item(2);
        } else {
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Female.item(1);
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Female.item(2);
        
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Female.item(1);
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Female.item(2);
        };    
if (values.Gender_RRT == "Male") {
    
        item.Statement_Compatible_A.item = item.Statement_Compatible_Male_A.item(1);
        item.Statement_Compatible_A.item = item.Statement_Compatible_Male_A.item(2);
        ...;
        
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Male_A.item(1);
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Male_A.item(2);
        ...;
        
        item.Statement_Compatible_B.item = item.Statement_Compatible_Male_B.item(1);
        item.Statement_Compatible_B.item = item.Statement_Compatible_Male_B.item(2);
        ...;
        
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Male_B.item(1);
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Male_B.item(2);
        ...;
        
} else {

        item.Statement_Compatible_A.item = item.Statement_Compatible_Female_A.item(1);
        item.Statement_Compatible_A.item = item.Statement_Compatible_Female_A.item(2);
        ...;
        
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Female_A.item(1);
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Female_A.item(2);
        ...;
        
        item.Statement_Compatible_B.item = item.Statement_Compatible_Female_B.item(1);
        item.Statement_Compatible_B.item = item.Statement_Compatible_Female_B.item(2);
        ...;
        
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Female_B.item(1);
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Female_B.item(2);
        ...;
}]
</trial>

<block Statement_Matched_Test_Block>
/ onblockbegin = [
    values.Statement_Set = list.Statement_Set.nextvalue;
    if (values.Statement_Set == "A") {
        item.Statement_Compatible.item = item.Statement_Compatible_A.item(1);
        item.Statement_Compatible.item = item.Statement_Compatible_A.item(2);
        ...;
        item.Statement_Incompatible.item = item.Statement_Incompatible_A.item(1);
        item.Statement_Incompatible.item = item.Statement_Incompatible_A.item(2);
        ...;
        
    } if (values.Statement_Set == "B") {
    
        item.Statement_Compatible.item = item.Statement_Compatible_B.item(1);
        item.Statement_Compatible.item = item.Statement_Compatible_B.item(2);
        ...;    
        item.Statement_Incompatible.item = item.Statement_Incompatible_B.item(1);
        item.Statement_Incompatible.item = item.Statement_Incompatible_B.item(2);
        ...;    
        
    } if ...
]
/ onblockend = [
    
    item.Statement_Compatible.clearitems();
    item.Statement_Incompatible.clearitems()
]
</block>


Apologies as well for the length, I have tried to exclude everything irrelevant but please let me know if there is anything else required and any help is greatly appreciated.

Cheers.

Impossible to answer or diagnose based on what you provided. Provide code that is actually runnable and shows the issue.

Hi Dave,

Thanks for the reply, have attached a zip file with the script in question. Hopefully this is the best avenue for this, but if it is easier I can instead include the code in the post.

To be more specific about the issue, seeing as all the code is provided. When running the task items will correctly be added to the 'Statement_Incompatible' <item> based upon the set value, but the 'Statement_Compatible' <item> will only ever fill with items from set A regardless of the value.

Hope this added information is helpful, and thanks again.

<text Statement_Compatible>
/ items = Statement_Compatible_A
/ fontstyle = ("Arial", 3.5%)
/ select = noreplacenorepeat
/ txcolor = black
</text>

is pulling from the wrong <item> element.
jgordon
jgordon
New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)
Group: Forum Members
Posts: 5, Visits: 28
Dave - 4/28/2025
jgordon - 4/28/2025
Apologies if this ends up being a silly issue.

I am currently trying to program part of a task and having a strange issue I cannot work out. I have four sets of stimuli items that make up the total set of stimuli items across the task. In this task there are four identical (at least for the purpose of this explanation) blocks, thus in every block the set of stimuli items is drawn from one of the four sets of stimuli items. I want the set of item for each block to be chosen randomly such that the order of sets of stimuli items is random but every participant sees all four sets of stimuli items once and only once.

I will include the relevant code below to provide further clarification, but my approach so far has been to set a <value> based on a <list> of the different possible item sets at the beginning of each <block>, I then, use a series of IF statements to check what the <value> is set to, and add the corresponding items from that specific item set to two general <item> elements such that they may be drawn upon to create the stimuli for that block. At the end of each block I then clear the general <item> elements.

My issue is that whilst one of the general <item> elements seems to be correctly filling with the items from the correct item set, the other general <item> element fills with items from the first set (first in regard to the order it appears within the series of IF statements). I cannot work out why this is happening, whether it is a simple mistake on my part or rather a misunderstanding of how Inquisit works. My apologies if anything is unclear as I am rather new to Inquisit so am trying to make things as clear as possible but may be missing crucial information. Regardless, as mentioned before I will include the relevant code below and any help would be greatly appreciated.

<item Statement_Compatible_Male_A>
...
</item>

<item Statement_Incompatible_Male_A>
...
</item>

<item Statement_Compatible_Male_B>
...
</item>

<item Statement_Incompatible_Male_B>
...
</item>

<item Statement_Compatible_Female_A>
...
</item>

<item Statement_Incompatible_Female_A>
...
</item>

<item Statement_Compatible_Female_B>
...
</item>

<item Statement_Incompatible_Female_B>
...
</item>

<item Statement_Compatible_A>
</item>

<item Statement_Compatible_B>
</item>

<item Statement_Incompatible_A>
</item>

<item Statement_Incompatible_B>
</item>

<item Statement_Compatible>
</item>

<item Statement_Incompatible>
</item>

<list Statement_Set>
/ items = ("A", "B", "C", "D")
/ replace = false
</list>

<trial Gender_Item_Allocation>
/ ontrialbegin = [
if (values.Gender_RRT == "Male") {
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Male.item(1);
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Male.item(2);
        
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Male.item(1);
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Male.item(2);
        } else {
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Female.item(1);
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Female.item(2);
        
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Female.item(1);
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Female.item(2);
        };    
if (values.Gender_RRT == "Male") {
    
        item.Statement_Compatible_A.item = item.Statement_Compatible_Male_A.item(1);
        item.Statement_Compatible_A.item = item.Statement_Compatible_Male_A.item(2);
        ...;
        
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Male_A.item(1);
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Male_A.item(2);
        ...;
        
        item.Statement_Compatible_B.item = item.Statement_Compatible_Male_B.item(1);
        item.Statement_Compatible_B.item = item.Statement_Compatible_Male_B.item(2);
        ...;
        
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Male_B.item(1);
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Male_B.item(2);
        ...;
        
} else {

        item.Statement_Compatible_A.item = item.Statement_Compatible_Female_A.item(1);
        item.Statement_Compatible_A.item = item.Statement_Compatible_Female_A.item(2);
        ...;
        
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Female_A.item(1);
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Female_A.item(2);
        ...;
        
        item.Statement_Compatible_B.item = item.Statement_Compatible_Female_B.item(1);
        item.Statement_Compatible_B.item = item.Statement_Compatible_Female_B.item(2);
        ...;
        
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Female_B.item(1);
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Female_B.item(2);
        ...;
}]
</trial>

<block Statement_Matched_Test_Block>
/ onblockbegin = [
    values.Statement_Set = list.Statement_Set.nextvalue;
    if (values.Statement_Set == "A") {
        item.Statement_Compatible.item = item.Statement_Compatible_A.item(1);
        item.Statement_Compatible.item = item.Statement_Compatible_A.item(2);
        ...;
        item.Statement_Incompatible.item = item.Statement_Incompatible_A.item(1);
        item.Statement_Incompatible.item = item.Statement_Incompatible_A.item(2);
        ...;
        
    } if (values.Statement_Set == "B") {
    
        item.Statement_Compatible.item = item.Statement_Compatible_B.item(1);
        item.Statement_Compatible.item = item.Statement_Compatible_B.item(2);
        ...;    
        item.Statement_Incompatible.item = item.Statement_Incompatible_B.item(1);
        item.Statement_Incompatible.item = item.Statement_Incompatible_B.item(2);
        ...;    
        
    } if ...
]
/ onblockend = [
    
    item.Statement_Compatible.clearitems();
    item.Statement_Incompatible.clearitems()
]
</block>


Apologies as well for the length, I have tried to exclude everything irrelevant but please let me know if there is anything else required and any help is greatly appreciated.

Cheers.

Impossible to answer or diagnose based on what you provided. Provide code that is actually runnable and shows the issue.

Hi Dave,

Thanks for the reply, have attached a zip file with the script in question. Hopefully this is the best avenue for this, but if it is easier I can instead include the code in the post.

To be more specific about the issue, seeing as all the code is provided. When running the task items will correctly be added to the 'Statement_Incompatible' <item> based upon the set value, but the 'Statement_Compatible' <item> will only ever fill with items from set A regardless of the value.

Hope this added information is helpful, and thanks again.
Attachments
Inquisit .zip (21 views, 10.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 107K
jgordon - 4/28/2025
Apologies if this ends up being a silly issue.

I am currently trying to program part of a task and having a strange issue I cannot work out. I have four sets of stimuli items that make up the total set of stimuli items across the task. In this task there are four identical (at least for the purpose of this explanation) blocks, thus in every block the set of stimuli items is drawn from one of the four sets of stimuli items. I want the set of item for each block to be chosen randomly such that the order of sets of stimuli items is random but every participant sees all four sets of stimuli items once and only once.

I will include the relevant code below to provide further clarification, but my approach so far has been to set a <value> based on a <list> of the different possible item sets at the beginning of each <block>, I then, use a series of IF statements to check what the <value> is set to, and add the corresponding items from that specific item set to two general <item> elements such that they may be drawn upon to create the stimuli for that block. At the end of each block I then clear the general <item> elements.

My issue is that whilst one of the general <item> elements seems to be correctly filling with the items from the correct item set, the other general <item> element fills with items from the first set (first in regard to the order it appears within the series of IF statements). I cannot work out why this is happening, whether it is a simple mistake on my part or rather a misunderstanding of how Inquisit works. My apologies if anything is unclear as I am rather new to Inquisit so am trying to make things as clear as possible but may be missing crucial information. Regardless, as mentioned before I will include the relevant code below and any help would be greatly appreciated.

<item Statement_Compatible_Male_A>
...
</item>

<item Statement_Incompatible_Male_A>
...
</item>

<item Statement_Compatible_Male_B>
...
</item>

<item Statement_Incompatible_Male_B>
...
</item>

<item Statement_Compatible_Female_A>
...
</item>

<item Statement_Incompatible_Female_A>
...
</item>

<item Statement_Compatible_Female_B>
...
</item>

<item Statement_Incompatible_Female_B>
...
</item>

<item Statement_Compatible_A>
</item>

<item Statement_Compatible_B>
</item>

<item Statement_Incompatible_A>
</item>

<item Statement_Incompatible_B>
</item>

<item Statement_Compatible>
</item>

<item Statement_Incompatible>
</item>

<list Statement_Set>
/ items = ("A", "B", "C", "D")
/ replace = false
</list>

<trial Gender_Item_Allocation>
/ ontrialbegin = [
if (values.Gender_RRT == "Male") {
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Male.item(1);
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Male.item(2);
        
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Male.item(1);
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Male.item(2);
        } else {
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Female.item(1);
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Female.item(2);
        
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Female.item(1);
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Female.item(2);
        };    
if (values.Gender_RRT == "Male") {
    
        item.Statement_Compatible_A.item = item.Statement_Compatible_Male_A.item(1);
        item.Statement_Compatible_A.item = item.Statement_Compatible_Male_A.item(2);
        ...;
        
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Male_A.item(1);
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Male_A.item(2);
        ...;
        
        item.Statement_Compatible_B.item = item.Statement_Compatible_Male_B.item(1);
        item.Statement_Compatible_B.item = item.Statement_Compatible_Male_B.item(2);
        ...;
        
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Male_B.item(1);
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Male_B.item(2);
        ...;
        
} else {

        item.Statement_Compatible_A.item = item.Statement_Compatible_Female_A.item(1);
        item.Statement_Compatible_A.item = item.Statement_Compatible_Female_A.item(2);
        ...;
        
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Female_A.item(1);
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Female_A.item(2);
        ...;
        
        item.Statement_Compatible_B.item = item.Statement_Compatible_Female_B.item(1);
        item.Statement_Compatible_B.item = item.Statement_Compatible_Female_B.item(2);
        ...;
        
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Female_B.item(1);
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Female_B.item(2);
        ...;
}]
</trial>

<block Statement_Matched_Test_Block>
/ onblockbegin = [
    values.Statement_Set = list.Statement_Set.nextvalue;
    if (values.Statement_Set == "A") {
        item.Statement_Compatible.item = item.Statement_Compatible_A.item(1);
        item.Statement_Compatible.item = item.Statement_Compatible_A.item(2);
        ...;
        item.Statement_Incompatible.item = item.Statement_Incompatible_A.item(1);
        item.Statement_Incompatible.item = item.Statement_Incompatible_A.item(2);
        ...;
        
    } if (values.Statement_Set == "B") {
    
        item.Statement_Compatible.item = item.Statement_Compatible_B.item(1);
        item.Statement_Compatible.item = item.Statement_Compatible_B.item(2);
        ...;    
        item.Statement_Incompatible.item = item.Statement_Incompatible_B.item(1);
        item.Statement_Incompatible.item = item.Statement_Incompatible_B.item(2);
        ...;    
        
    } if ...
]
/ onblockend = [
    
    item.Statement_Compatible.clearitems();
    item.Statement_Incompatible.clearitems()
]
</block>


Apologies as well for the length, I have tried to exclude everything irrelevant but please let me know if there is anything else required and any help is greatly appreciated.

Cheers.

Impossible to answer or diagnose based on what you provided. Provide code that is actually runnable and shows the issue.
jgordon
jgordon
New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)
Group: Forum Members
Posts: 5, Visits: 28
Apologies if this ends up being a silly issue.

I am currently trying to program part of a task and having a strange issue I cannot work out. I have four sets of stimuli items that make up the total set of stimuli items across the task. In this task there are four identical (at least for the purpose of this explanation) blocks, thus in every block the set of stimuli items is drawn from one of the four sets of stimuli items. I want the set of item for each block to be chosen randomly such that the order of sets of stimuli items is random but every participant sees all four sets of stimuli items once and only once.

I will include the relevant code below to provide further clarification, but my approach so far has been to set a <value> based on a <list> of the different possible item sets at the beginning of each <block>, I then, use a series of IF statements to check what the <value> is set to, and add the corresponding items from that specific item set to two general <item> elements such that they may be drawn upon to create the stimuli for that block. At the end of each block I then clear the general <item> elements.

My issue is that whilst one of the general <item> elements seems to be correctly filling with the items from the correct item set, the other general <item> element fills with items from the first set (first in regard to the order it appears within the series of IF statements). I cannot work out why this is happening, whether it is a simple mistake on my part or rather a misunderstanding of how Inquisit works. My apologies if anything is unclear as I am rather new to Inquisit so am trying to make things as clear as possible but may be missing crucial information. Regardless, as mentioned before I will include the relevant code below and any help would be greatly appreciated.

<item Statement_Compatible_Male_A>
...
</item>

<item Statement_Incompatible_Male_A>
...
</item>

<item Statement_Compatible_Male_B>
...
</item>

<item Statement_Incompatible_Male_B>
...
</item>

<item Statement_Compatible_Female_A>
...
</item>

<item Statement_Incompatible_Female_A>
...
</item>

<item Statement_Compatible_Female_B>
...
</item>

<item Statement_Incompatible_Female_B>
...
</item>

<item Statement_Compatible_A>
</item>

<item Statement_Compatible_B>
</item>

<item Statement_Incompatible_A>
</item>

<item Statement_Incompatible_B>
</item>

<item Statement_Compatible>
</item>

<item Statement_Incompatible>
</item>

<list Statement_Set>
/ items = ("A", "B", "C", "D")
/ replace = false
</list>

<trial Gender_Item_Allocation>
/ ontrialbegin = [
if (values.Gender_RRT == "Male") {
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Male.item(1);
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Male.item(2);
        
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Male.item(1);
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Male.item(2);
        } else {
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Female.item(1);
        item.Statement_Example_Compatible.item = item.Statement_Example_Compatible_Female.item(2);
        
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Female.item(1);
        item.Statement_Example_Incompatible.item = item.Statement_Example_Incompatible_Female.item(2);
        };    
if (values.Gender_RRT == "Male") {
    
        item.Statement_Compatible_A.item = item.Statement_Compatible_Male_A.item(1);
        item.Statement_Compatible_A.item = item.Statement_Compatible_Male_A.item(2);
        ...;
        
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Male_A.item(1);
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Male_A.item(2);
        ...;
        
        item.Statement_Compatible_B.item = item.Statement_Compatible_Male_B.item(1);
        item.Statement_Compatible_B.item = item.Statement_Compatible_Male_B.item(2);
        ...;
        
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Male_B.item(1);
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Male_B.item(2);
        ...;
        
} else {

        item.Statement_Compatible_A.item = item.Statement_Compatible_Female_A.item(1);
        item.Statement_Compatible_A.item = item.Statement_Compatible_Female_A.item(2);
        ...;
        
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Female_A.item(1);
        item.Statement_Incompatible_A.item = item.Statement_Incompatible_Female_A.item(2);
        ...;
        
        item.Statement_Compatible_B.item = item.Statement_Compatible_Female_B.item(1);
        item.Statement_Compatible_B.item = item.Statement_Compatible_Female_B.item(2);
        ...;
        
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Female_B.item(1);
        item.Statement_Incompatible_B.item = item.Statement_Incompatible_Female_B.item(2);
        ...;
}]
</trial>

<block Statement_Matched_Test_Block>
/ onblockbegin = [
    values.Statement_Set = list.Statement_Set.nextvalue;
    if (values.Statement_Set == "A") {
        item.Statement_Compatible.item = item.Statement_Compatible_A.item(1);
        item.Statement_Compatible.item = item.Statement_Compatible_A.item(2);
        ...;
        item.Statement_Incompatible.item = item.Statement_Incompatible_A.item(1);
        item.Statement_Incompatible.item = item.Statement_Incompatible_A.item(2);
        ...;
        
    } if (values.Statement_Set == "B") {
    
        item.Statement_Compatible.item = item.Statement_Compatible_B.item(1);
        item.Statement_Compatible.item = item.Statement_Compatible_B.item(2);
        ...;    
        item.Statement_Incompatible.item = item.Statement_Incompatible_B.item(1);
        item.Statement_Incompatible.item = item.Statement_Incompatible_B.item(2);
        ...;    
        
    } if ...
]
/ onblockend = [
    
    item.Statement_Compatible.clearitems();
    item.Statement_Incompatible.clearitems()
]
</block>


Apologies as well for the length, I have tried to exclude everything irrelevant but please let me know if there is anything else required and any help is greatly appreciated.

Cheers.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search