Positioning of random images & Using a conditional expression in /trialduration... & more.


Author
Message
aya
aya
Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)
Group: Forum Members
Posts: 14, Visits: 1

Hello, I am doing an experiment that involves presenting 4 images on each trial. I would like to present the images in a 2 x 2 square, but have the images randomized to a position every time the experiment is run.


For example, if I had images 1, 2, 3, and 4: 


Participant 1, Trial 1 sees this:


1 3


4 2


Participant 2, Trial 1 sees this:


2 4


1 3


I hope that makes sense. 


 I understand that you can randomize the images in trials, but that's only if you want to present them in a row or a column. Is that correct?


Also, in the /trialduration property of <trial>, I would like to set a number of milliseconds only if a certain constraint is satisfied, i.e. /trialduration = [if (values.timer==1) 90000 else 99999999]. I thought this would work as the if statement would return an integer. I really wish this worked...


Lastly, I would like to redirect my participants to a survey website after the experiment, but pass along their subject ID to the URL. Kinda like what was going on here. But how do I access that subject number? Is it unique for every participant?


Any help would be greatly appreciated.



 Thanks!


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: 12K, Visits: 98K

I would like to present the images in a 2 x 2 square, but have the images randomized to a position every time the experiment is run


See e.g. https://www.millisecond.com/forums/Topic5501.aspx for hints.


Also, in the /trialduration property of <trial>, I would like to set a number of milliseconds only if a certain constraint is satisfied, i.e. /trialduration = [if (values.timer==1) 90000 else 99999999]. I thought this would work as the if statement would return an integer. I really wish this worked...


It does work. Correct syntax is


<trial mytrial>
[...]
/ trialduration = if (values.timer==1) 900 else 9999
</trial>


Lastly, I would like to redirect my participants to a survey website after the experiment, but pass along their subject ID to the URL. Kinda like what was going on here. But how do I access that subject number? Is it unique for every participant?


You can't access the subject id. The method is to *always* start with the survey application (even if you're only showing some kind of introductory page), use the survey app's unique subject identifier, have the survey forward this id to Inquisit as URL parameter, etc. This is covered extensively in the "How to Interoperate Inquisit Web Edition with Online
Survey Packages" topic in the Inquisit documentation.


Regards,


~Dave


aya
aya
Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)
Group: Forum Members
Posts: 14, Visits: 1

Thank you! 


I will read more about how to configure web experiments .


For randomizing the image positions, I decided to make the positions static and the images the ones that would be randomized. Unfortunately, it didn't work. I messed around with the code from the topic you linked to, trying it out with text stimuli. 


I would define a stimuli like so: (there are 4 of them in my code, just showing one) 


<text type2c>


/ items = (counter.picz.selectedvalue)


/ vposition = 60%


/ hposition = 30%


</text>


and the counter like so. In the real experiment I would use image names (it would be fine, right?)




<counter picz>


/ items = ("blorg", "blagh", "bloo", "fjekl")


/ select = noreplace


</counter>


Now when I run the code, nothing shows up. I'm assuming it has to do with counter.picz.selectedvalue. I also tried currentitem, item. But nothing works :/ 

The reason why I'm keeping the positions static is because I need to vary the positions based on the x and y coordinates, which will be trickier to handle...


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: 12K, Visits: 98K

The correct syntax to use counters for item selection is


<text type2c>
/ items = (...)
/ vposition = 60%
/ hposition = 30%
/ select = picz
</text>


See the documentation for the /select attribute and the <counter> element for details.


Regards,


~Dave


aya
aya
Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)
Group: Forum Members
Posts: 14, Visits: 1

OK, I updated that piece of code like so: 



<text type1>


/ txcolor = (red)


/ select = picz


/ vposition = 25%


/ hposition = 75%


</text>



and 


the counter like so:



<counter picz>


/ select = sequence(5, 4, 3, 2, 1)


</counter>




type1 object still doesn't show up. :(


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: 12K, Visits: 98K

Since your <text> element does not have any items (i.e. no /items attribute), there's nothing it could possibly display.


Regards,


~Dave


aya
aya
Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)
Group: Forum Members
Posts: 14, Visits: 1

But what I want to be randomized is in the counter. (e.g. the numbers 5, 4, 3, 2, 1) If I put something in /items, wouldn't that disregard the numbers in the counter? 


I want to do something like what you did in the other topic:



<counter type2pos>


/ items = (5%,25%,25%,35%,50%,65%,80%,95%)


/ not = (type1pos)


/ select = noreplace


/ selectionrate = always


</counter>


Where the different percentages are being put into the hposition property in <text>. Does /select in <text> not have access to the /items in <counter>? 


Aya


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: 12K, Visits: 98K

A <counter> referenced in a stimulus element's (<text>, <picture>, etc.) /select attribute has the purpose of delivering an item's index number, not the actual item. Thus


<text mytext>
/ items = ("a","b","c")
/ select = mycounter
</text>

<counter mycounter>
/ select = sequence(1,2,3)
</counter>


Regards,


~Dave


aya
aya
Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)
Group: Forum Members
Posts: 14, Visits: 1

Ahh that makes a lot more sense now! Thank you very much. 


This would mean I would have to specify the list of images in /item for each <picture>, then, and have to use multiple <counter>s to make sure that each image presented is unique? 


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: 12K, Visits: 98K

This would mean I would have to specify the list of images in /item for each <picture>, then, and have to use multiple <counter>s to make sure that each image presented is unique? 


The answer to both is "Not necessarily":


<text left>
/ items = myitems
/ position = (25%,50%)
/ select = mycounter
</text>

<text center>
/ items = myitems
/ position = (50%,50%)
/ select = mycounter
</text>

<text right>
/ items = myitems
/ position = (75%,50%)
/ select = mycounter
</text>

<item myitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
</item>

<counter mycounter>
/ select = noreplace(1-3)
/ selectionrate = always
</counter>

<trial mytrial>
/ stimulusframes = [1=left, center, right]
/ validresponse = (anyresponse)
</trial>

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


The optimal approach depends on what you ultimately want to do, so plan wisely.


Regards,


~Dave


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search