fully randomized conditional presentation of three stimuli


Author
Message
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: 104K
> 'Unable to initialize <picture targetlike> item number 29. Verify theitem exists and is correctly defined.'
> Most of the time it concerns item numer 0 or the last items of the liststargetlike or targetdislike.This error appears
> in each of my three conditions,which have separate lists.


Means that you are referring to an item number *at runtime* which does not exist in the respective <list>. If you are displaying images, there can be no item 0. If the error pertains to any other item number, that item does not exist. For example, there is no item number 29 in <picture targetlike>:

<picture targetdislike>
/items = kollegen
/select = list.targetitemsdislike.nextindex
/ position= (70,50)
/ size = (30%, 30%)
</picture>



<item kollegen>
/1 = "1.bmp"
/2 = "2.jpg"
/3 = "3.bmp"
/4 = "4.jpg"
/5 = "5.bmp"
/6 = "6.jpg"
/7 = "7.jpg"
/8 = "8.jpg"
/9 = "9.bmp"
/10 = "10.jpg"
/11 = "11.bmp"
/12 = "12.bmp"
/13 = "13.bmp"
/14 = "14.bmp"
/15 = "15.jpg"
/16 = "16.jpg"
/17 = "17.jpg"
/18 = "18.bmp"
/19 = "19.jpg"
/20 = "20.bmp"
/21 = "21.jpg"
/22 = "22.bmp"
/23 = "23.jpg"
/24 = "24.jpg"
/25 = "25.bmp"
/26 = "26.png"
/27 = "27.png"
/28 = "28.jpg"
</item>

There are 28 items, not 29.

The problem likely is that you are selecting according to the list's item *index*.

/select = list.targetitemsdislike.nextindex

You *should* be selecting according to the list's item *value*.

/select = list.targetitemsdislike.nextvalue


Your lists contain the same item numbers multiple times, i.e., there are many more entries in the list than there are items.

For example, consider

<block myblock>
/ trials = [1-4=mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=mypicture]
/ validresponse = (57)
</trial>

<picture mypicture>
/ items = ("A.bmp", "B.bmp")
/ select = list.mylist.nextindex
</picture>

<list mylist>
/ items = (1,1,2,2)
</list>

which will *fail*, versus the correct

<block myblock>
/ trials = [1-4=mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=mypicture]
/ validresponse = (57)
</trial>

<picture mypicture>
/ items = ("A.bmp", "B.bmp")
/ select = list.mylist.nextvalue
</picture>

<list mylist>
/ items = (1,1,2,2)
</list>


Edited 9 Years Ago by Dave
Christina F
Christina F
Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)
Group: Forum Members
Posts: 5, Visits: 23

Hello Dave,

thanks a lot! I did get your point and it is working right now! Great!

Unfortunately, there is a new problem.
Sometimes, not every time, there is an error that appears during theexperiment.
The experiment starts and the first pages are shown, but right before the<block relation> or after the first few presentations it is terminatedand there is this message:
'Unable to initialize <picture targetlike> item number 29. Verify theitem exists and is correctly defined.'
Most of the time it concerns item numer 0 or the last items of the liststargetlike or targetdislike.This error appears in each of my three conditions,which have separate lists.

I tested every picture and there was no problem in presenting them on thescreen, so that doesn't seem to be the error.
I am afraid there is a mistake in the definiton of the lists.

Do you have any idea?
I attached my script and the stimuli as a zip-folder. I couldn't attach the chinese characters for the AMP (block test, pic1 - pic200)
Maybe you could transpose them to text elements, as you did before.

Thanks again,
Christina


Attachments
Script Christina.zip (648 views, 3.00 MB)
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: 104K
> I need to show the same sources again and don't want to create a new list.

I understood that. You may not want to create a new list, but that is what you have to do. The only alternative is to remove the 2nd instance of each item from the existing <list>s (see the documentation for the list element's removeitem() function). Note that this will *destroy* the lists' existing structure, i.e., if you want to again show the source-target pairs later on, that won't be possible without you re-creating the lists' original structure.

Christina F
Christina F
Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)
Group: Forum Members
Posts: 5, Visits: 23
Hello Dave,

maybe I didn't explain it very clearly.

I need to show the same sources again and don't want to create a new list.
First the sources are shown with the targets and the relation (that's what we've already written about and is working right now)
but afterwards I want to show the same sources again. Each source should be presented once in a likability rating.
Like that, I want to pick each source once out of the lists, which were created for the relation-block.

I am referring to your edited version of the script and want to add the likability rating.
I am attaching both.

Hopefully, this was a bit more comprehensible.

Thanks a lot,
Christina

-------------------EDITED SCRIPT------------------------
<block relation>
/ onblockbegin = [list.sourceitemslike.appenditem(list.allitems.nextindex); list.sourceitemslike.appenditem(list.allitems.currentindex);
    list.sourceitemslike.appenditem(list.allitems.nextindex); list.sourceitemslike.appenditem(list.allitems.currentindex);
  
    list.sourceitemsdislike.appenditem(list.allitems.nextindex); list.sourceitemsdislike.appenditem(list.allitems.currentindex);
    list.sourceitemsdislike.appenditem(list.allitems.nextindex); list.sourceitemsdislike.appenditem(list.allitems.currentindex);

    list.targetitemslike.appenditem(list.allitems.nextindex); list.targetitemslike.appenditem(list.allitems.nextindex);
    list.targetitemslike.appenditem(list.targetitemslike.item(1)); list.targetitemslike.appenditem(list.targetitemslike.item(2));

    list.targetitemsdislike.appenditem(list.targetitemslike.item(1)); list.targetitemsdislike.appenditem(list.targetitemslike.item(2));
    list.targetitemsdislike.appenditem(list.targetitemslike.item(1)); list.targetitemsdislike.appenditem(list.targetitemslike.item(2));]
/ trials = [1-8 = noreplace(relationlike, relationdislike)]
</block>

<trial relationlike>
/ stimulusframes = [1=sourcelike; 2=targetlike; 3=like]
/timeout = 5000
/pretrialpause= 1000
</trial>

<trial relationdislike>
/ stimulusframes = [1=sourcedislike; 2=targetdislike; 3=dislike]
/timeout = 5000
/pretrialpause= 1000
</trial>

<text like>
/items = ("mag")
/position= (50,50)
/fontstyle= ("ARIAL", 40, true, false, false, false, 5, 0)
/ select = replace
</text>

<text dislike>
/items = ("mag nicht")
/position= (50,50)
/fontstyle= ("ARIAL", 40, true, false, false, false, 5, 0)
/ select = replace
</text>

<text sourcelike>
/items = kollegen
/ select = list.sourceitemslike.nextvalue
/ position= (25,50)
/ size = (30%, 30%)
</text>

<text sourcedislike>
/items = kollegen
/ select = list.sourceitemsdislike.nextvalue
/ position= (25,50)
/ size = (30%, 30%)
</text>

<text targetlike>
/items = kollegen
/ select = list.targetitemslike.nextvalue
/ position= (75,50)
/ size = (30%, 30%)
</text>

<text targetdislike>
/items = kollegen
/ select = list.targetitemsdislike.nextvalue
/ position= (75,50)
/ size = (30%, 30%)
</text>

<item kollegen>
/1 = "2.jpg"
/2 = "3.jpg"
/3 = "4.jpg"
/4 = "5.bmp"
/5 = "6.jpg"
/6 = "7.jpg"
/7 = "8.jpg"
/8 = "9.bmp"
/9 = "10.jpg"
/10 = "11.bmp"
</item>

<list allitems>
/ poolsize = 10
/ selectionrate = always
</list>

<list sourceitemslike>
</list>

<list targetitemslike>
/ selectionmode = list.sourceitemslike.currentindex
</list>


<list sourceitemsdislike>
</list>

<list targetitemsdislike>
/ selectionmode = list.sourceitemsdislike.currentindex
</list>


--------------------NEW PART OF THE SCRIPT---------------------------------
<likert likability>
/stimulusframes = [1=question; 2= noreplace(sourcelike2, sourcedislike2)]
/anchors = [1 = "sehr unsympathisch", 2="", 3="", 4="", 5="", 6="", 7="", 8="", 9= "sehr sympathisch"]
/numpoints = 9
/anchorwidth = 100
/position = (50,70)
</likert>

<picture sourcelike2>
/items = kollegen
/ select = list.sourceitemslike.nextvalue
/ position= (50,30)
/ size = (40%, 40%)
</picture>

<picture sourcedislike2>
/items = kollegen
/ select = list.sourceitemsdislike.nextvalue
/ position= (50,30)
/ size = (40%, 40%)
</picture>

<block likability>
/preinstructions = (likability)
/trials = [1 - 4=likability]
</block>



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: 104K
> Right now, one photo is presented twice, because the list contains it two times.
> How can I pick it once?

Set up <list>s that only contain the item once (you already know how to do that as that's what's been discussed throughout the thread), use those lists for sampling in your rating-block.

Christina F
Christina F
Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)
Group: Forum Members
Posts: 5, Visits: 23
Hello Dave,
thanks a lot! The update did help and it seems to work right now.

A different question:
For another trial I need to present each source once for a rating of their likability:

<likert likability>
/stimulusframes = [1=question; 2= noreplace(sourcelike2, sourcedislike2)]
/anchors = [1 = "sehr unsympathisch", 2="", 3="", 4="", 5="", 6="", 7="", 8="", 9= "sehr sympathisch"]
/numpoints = 9
/anchorwidth = 100
/position = (50,70)
</likert>

<picture sourcelike2>
/items = kollegen
/ select = list.sourceitemslike.nextvalue
/ position= (50,30)
/ size = (40%, 40%)
</picture>

<picture sourcedislike2>
/items = kollegen
/ select = list.sourceitemsdislike.nextvalue
/ position= (50,30)
/ size = (40%, 40%)
</picture>

<block likability>
/preinstructions = (likability)
/trials = [1 - 4=likability]
</block>

Right now, one photo is presented twice, because the list contains it two times.
How can I pick it once?

Thanks,
Christina

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: 104K
Rene,

No, scripts should of course *not* be interpreted differently depending on OS. But note that you're not using the same Inquisit version under Mac and Windows (4.0.7.0 on the Mac; 4.0.8.0 under Windows). Whether that plays a role here, I don't know.

FWIW, the example code I've provided throughout this thread has been tested under Windows / Inquisit 4.0.8.0 and definitely works as expected for me.

Also, errors can be probabilistic in nature, especially if random sampling is involved. I.e., the error may be there, lurking in the background, but you might not hit the specific conditions under which it reveals itself.

As mentioned previously, there is a possibility that a buggy graphics card driver causes the weird behavior. Try updating the driver on the Windows box.

If none of that helps, attach the entire code to this thread and provide whatever additional info you can illustrating the error (data files, screenshots, etc.).

Rene
Rene
Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)Associate Member (197 reputation)
Group: Forum Members
Posts: 1, Visits: 0
Dave,

we've run Christina's script several times with varying amounts of trials on my Macbook and couldn't replicate the error she's describing here. Pictures from the generated sources were exclusively shown where the were supposed to be and we never once had the same picture shown twice. Wouldn't that rule out a script error? Or are the situations where the same script is interpreted differently depending on the OS?

Thanks,
Rene
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: 104K
I would say that a Windows / Inquisit bug is unlikely. It's more likely that a mistake is still lurking somewhere in your script.

Another -- albeit remote -- possibility is a botched graphics card driver on your Windows box. Update it to the latest version available from the vendor.

Christina F
Christina F
Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)Partner Member (843 reputation)
Group: Forum Members
Posts: 5, Visits: 23
Hello,

the corrected script seems to work on a mac computer, version 4.0.7. Thanks a lot!
But on my Windows computer, version 4.0.8. there are still some complications.
When you are just looking on the data, everything seems fine and correct.
But for several times in the presentation, one stimulus was presented as source and target at the same time,
without being recorded in the data. Instead, other items were recorded, which were not shown in the trial.

Could the problem be a Windows bug?
Do you have any idea to solve the problem?

Thank you,
Christina


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search