Conditional repeating of trial (and corresponding item selections)


Author
Message
ewc2138
ewc2138
Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)
Group: Forum Members
Posts: 7, Visits: 46
I'm trying to program an experiment where on each trial, a grid of 4 images is presented, after which a single image is shown as a comparison.  Each of the images is assigned a value for its brightness from -3 [lowest brightness] to 3 [highest brightness] (so each image has a value of -3, -2, -1, 0, 1, 2, or 3).  The subjects' task is to say whether the single image is more or less than the collective average brightness of the 4 grid images that came right before it.

So, there are 2 requirements:
1 = The program has to randomly select 5 images on each trial -- 4 grid, 1 compare
2 = The average of the 4 grid images must be different than the 1 compare image -- if not, it has to resample the 5 image stimuli and only present the trial when that's true

Is there a particularly elegant way to do this in Inquisit?  I was thinking about assigning values to the images within Inquisit based on what item numbers are randomly selected, but I'm not sure how to implement the part where Inquisit checks the comparison of the averages for grid images vs. compare image, and resample the image items if the condition isn't met.

Any help would be much appreciated.  Thanks 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: 12K, Visits: 98K
ewc2138 - Monday, May 22, 2017
I'm trying to program an experiment where on each trial, a grid of 4 images is presented, after which a single image is shown as a comparison.  Each of the images is assigned a value for its brightness from -3 [lowest brightness] to 3 [highest brightness] (so each image has a value of -3, -2, -1, 0, 1, 2, or 3).  The subjects' task is to say whether the single image is more or less than the collective average brightness of the 4 grid images that came right before it.

So, there are 2 requirements:
1 = The program has to randomly select 5 images on each trial -- 4 grid, 1 compare
2 = The average of the 4 grid images must be different than the 1 compare image -- if not, it has to resample the 5 image stimuli and only present the trial when that's true

Is there a particularly elegant way to do this in Inquisit?  I was thinking about assigning values to the images within Inquisit based on what item numbers are randomly selected, but I'm not sure how to implement the part where Inquisit checks the comparison of the averages for grid images vs. compare image, and resample the image items if the condition isn't met.

Any help would be much appreciated.  Thanks so much!

> I was thinking about assigning values to the images within Inquisit based on what item numbers are randomly selected

This intuitively seems to be the right approach to me.

> but I'm not sure how to implement the part where Inquisit checks the comparison of the averages for grid images vs. compare image, and resample the image items if the
> condition isn't met.

This should be doable using some <expressions> and/or /ontrialbegin logic: Sample item numbers, check the associated values and compare, if check fails: repeat. See e.g. https://www.millisecond.com/forums/Topic7122.aspx for something abstractly related: Finding an item that was not recently presented.

ewc2138
ewc2138
Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)
Group: Forum Members
Posts: 7, Visits: 46
Thanks for the reply!  To repeat the trial sampling of the images if the check fails, would you use the "notrial" option in the branch attribute?  http://www.millisecond.com/support/docs/v5/html/language/attributes/branch.htm

Or is there another better way to do this?  I also need to make sure that there are exactly 200 valid trials for each subject, so if the check fails, I wouldn't want that to count towards the total trials for that subject.
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
ewc2138 - Monday, May 22, 2017
Thanks for the reply!  To repeat the trial sampling of the images if the check fails, would you use the "notrial" option in the branch attribute?  http://www.millisecond.com/support/docs/v5/html/language/attributes/branch.htm

Or is there another better way to do this?  I also need to make sure that there are exactly 200 valid trials for each subject, so if the check fails, I wouldn't want that to count towards the total trials for that subject.

I don't think the /branch'ing would be required at all, and hence I see no obvious need or use for the "notrial" stub. If you handle all the selection stuff /ontrialbegin / use an expression that repeats until it gets a valid result (cf. the example linked previously), there should be no need to abort or repeat a trial. And consequently ensuring 200 (valid) trials total per subject should not pose a problem either.

ewc2138
ewc2138
Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)Partner Member (815 reputation)
Group: Forum Members
Posts: 7, Visits: 46
Hi Dave,

Thanks for the reply!  I think I got it now ...


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search