Branching out if subject underperforms


Author
Message
ldobb
ldobb
Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)
Group: Forum Members
Posts: 36, Visits: 146
Hi Dave,

I'm having trouble figuring out how to send underperforming subjects to a page that gives them their % accuracy. I've tried onblockend and branch but nothing seems to work. I also want them to pass a capture check, and if they don't, for that to send them to another page. Here are the relevant portions of script:


<block sliderintro>
/ trials = [1-2 = instructions_1; 3 = milk_slide_pic; 4 = instructions_2]
/ bgstim = (spacebar)
</block>

<block slider>
/ trials = [ 1-38 = noreplace(capture1, capture2, 
alc, alc, alc, alc, alc, alc, alc, alc, alc, alc, alc, alc, alc, alc, alc, alc, alc, alc,
nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc, nonalc)]
/ onblockend = [if (values.capture < 4) block.nocapture else block.stimintro]
</block>

<block stimintro>
/ trials = [1 = preinstructions_3; 2 = instructions_3; 3-4 = instructions_3a; 5-6 = instructions_3b; 7-10 = instructions_3c; 11 = probe_practice1; 12 = probe_practice2; 13 = instructions_4]
/ bgstim = (spacebar)
</block>

<block stimuli>
/ trials = [1-36 = noreplace(
alcoholAL, alcoholAL, alcoholAL, alcoholAL, alcoholAR, alcoholAR, alcoholAR, alcoholAR,
alcoholAL, alcoholAL, alcoholAL, alcoholAL, alcoholAL, alcoholAR, alcoholAR, alcoholAR, alcoholAR, alcoholAR, 
alcoholBL, alcoholBL, alcoholBL, alcoholBL, alcoholBR, alcoholBR, alcoholBR, alcoholBR, alcoholBR, alcoholBR, 
alcoholBL, alcoholBL, alcoholBL, alcoholBL, alcoholBL, alcoholBR, alcoholBR, alcoholBR)]
/ onblockend = [if (expressions.alc_percent < 75 || expressions.nonalc_percent < 75) block.underaccuracy else block.mturk]
</block>

<block nocapture>
/ trials = [1 = nocapture]
</block>

<block underaccuracy>
/ trials = [1 = underaccuracy]
</block>

<block mturk>
/ trials = [1 = mturk]
</block>

<expt>
/ blocks = [1 = sliderintro; 2 = slider]
</expt>


-------------------------------------------------
              VALUES/EXPR
-------------------------------------------------

<values>
/ probe_alc_pos = 0
/ probe_nonalc_pos = 0
/ probe_arrow_pos = 0
/ probe_alc_rt_sum = 0
/ probe_nonalc_rt_sum = 0
/ image_cat = 0
/ image_name = 0
/ alc_enjoy_sum = 0
/ alc_want_sum = 0
/ alc_num = 0
/ alc_rt_sum = 0
/ nonalc_enjoy_sum = 0
/ nonalc_want_sum = 0
/ nonalc_num = 0
/ nonalc_rt_sum = 0
/ alc_probe_sum = 0
/ nonalc_probe_sum = 0
/ slider_correct = 0
/ capture = 0
</values>

<expressions>
/ alc_enjoy_meanrating = (values.alc_enjoy_sum/values.alc_num)
/ alc_want_meanrating = (values.alc_want_sum/values.alc_num)
/ alc_rating_meanRT = (values.alc_rt_sum/values.alc_num)
/ nonalc_enjoy_meanrating = (values.nonalc_enjoy_sum/values.nonalc_num)
/ nonalc_want_meanrating = (values.nonalc_want_sum/values.nonalc_num)
/ nonalc_rating_meanRT = (values.nonalc_rt_sum/values.nonalc_num)
/ alc_probe_correct = (values.alc_probe_sum/18)
/ nonalc_probe_correct = (values.nonalc_probe_sum/18)
/ alc_probe_meanRT = (values.probe_alc_rt_sum/values.alc_probe_sum)
/ nonalc_probe_meanRT = (values.probe_nonalc_rt_sum/values.nonalc_probe_sum)
/ alc_percent = round(expressions.alc_probe_correct*100)
/ nonalc_percent = round(expressions.nonalc_probe_correct*100)
</expressions>

<trial alcoholAL>
/ posttrialpause = 1000
/ stimulustimes = [0 = fixation; 500 = erasefixation, alcoholL_arrowL, nonalcR_arrowL, arrowL; 700 = blankscreen, drink_nonalc, drink_alc]
/ validresponse = (200, 208)
/ iscorrectresponse = [(text.drink_alc.vposition == 35% && trial.alcoholAL.response == 200) || (text.drink_alc.vposition == 65% && trial.alcoholAL.response == 208)]
/ correctmessage = (drink_alc_clicked, 500)
/ errormessage = (drink_nonalc_clicked, 500)
/ branch = [if (text.drink_nonalc.vposition == 35% && trial.alcoholAL.response == 200) trial.alcoholAL.error == true]
/ branch = [if (text.drink_nonalc.vposition == 65% && trial.alcoholAL.response == 208) trial.alcoholAL.error == true]
/ responsemessage = (0, blankscreen, 100)
/ timeout = 3700
/ ontrialbegin = [values.probe_alc_pos = "L"; values.probe_nonalc_pos = "R"; values.probe_arrow_pos = "L"; values.image_cat = "ALC"; values.image_name = picture.alcoholl_arrowl.currentitem]
/ ontrialend = [if (trial.alcoholal.correct == true) 
 {values.alc_probe_sum += 1; values.probe_alc_rt_sum += trial.alcoholal.latency;};] 
</trial>

<trial alc>
/ stimulustimes = [0 = alc]
/ validresponse = (0)
/ trialduration = 3000
/ ontrialbegin = [values.image_cat = "ALC"; values.image_name = picture.alc.currentitem]
/ ontrialend = [values.image_cat = "ALC"; values.image_name = picture.alc.currentitem]
/ responsetrial = (0, rating)
/ correctresponse = (0)
/ beginresponsetime = 3000
</trial>

<trial nonalc>
/ stimulustimes = [0 = nonalc]
/ validresponse = (0)
/ trialduration = 3000
/ ontrialbegin = [values.image_cat = "NONALC"; values.image_name = picture.nonalc.currentitem]
/ ontrialend = [values.image_cat = "NONALC"; values.image_name = picture.nonalc.currentitem]
/ responsetrial = (0, rating)
/ correctresponse = (0)
/ beginresponsetime = 3000
</trial>

<surveypage rating>
/ questions = [1 = stim_slider_want; 2 = stim_slider_enjoy]
/ stimulusframes = [1 = slider_q1, slider_l1, slider_r1, slider_remind, slider_q2, slider_l2, slider_r2, slider_remind]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Submit"
/ timeout = 10000
/ navigationbuttonfontstyle = ("Arial", 2.5%, true)
/ nextbuttonposition = (46.75%, 85%)
/ ontrialbegin = [if (values.image_cat == "ALC") {values.image_cat = "ALC"; values.image_name = picture.alc.currentitem}]
/ ontrialbegin = [if (values.image_cat == "NONALC") {values.image_name = picture.nonalc.currentitem; values.image_cat = "NONALC"}]
/ ontrialend = [if (slider.stim_slider_want.response == 50 && slider.stim_slider_enjoy.response == 50 && surveypage.rating.latency >= 10000)
    values.slider_correct = 0 else values.slider_correct = 1]
/ ontrialend = [if (values.image_cat == "ALC" && values.slider_correct != 0) {values.alc_num += 1; 
 values.alc_enjoy_sum += slider.stim_slider_enjoy.response; 
 values.alc_want_sum += slider.stim_slider_want.response;
 values.alc_rt_sum += surveypage.rating.latency;};]
/ ontrialend = [if (values.image_cat == "NONALC" && values.slider_correct != 0) {values.nonalc_num += 1; 
 values.nonalc_enjoy_sum += slider.stim_slider_enjoy.response; 
 values.nonalc_want_sum += slider.stim_slider_want.response;
 values.nonalc_rt_sum += surveypage.rating.latency;};]
/ ontrialend = [if (values.image_cat == "ALC") values.image_name = picture.alc.currentitem]
/ ontrialend = [if (values.image_cat == "NONALC") values.image_name = picture.nonalc.currentitem]
/ response = timeout (10000)
</surveypage>


-------------------------------------------------
              CAPTURES
-------------------------------------------------
<trial capture1>
/ stimulustimes = [0 = hotchoc_slide_pic]
/ timeout = 3000
/ validresponse = (0)
/ responsetrial = (0, cap1_surv)
</trial>

<surveypage cap1_surv>
/ questions = [1 = cap1_slider1; 2 = cap1_slider2]
/ stimulusframes = [1 = cap1_q1, cap1_l1, cap1_r1, slidercap_remind; 2 = cap1_q2, cap1_l2, cap1_r2, slider_remind]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Submit"
/ navigationbuttonfontstyle = ("Arial", 2.5%, true)
/ nextbuttonposition = (46.75%, 85%)
/ timeout = 10000
/ ontrialend = [if (slider.cap1_slider1.response >= 75 || slider.cap1_slider2.response <= 25) 
    values.slider_correct = 1 else values.slider_correct = 0]
/ ontrialend = [if (slider.cap1_slider1.response >= 75 ) values.capture += 1]
/ ontrialend = [if (slider.cap1_slider2.response <= 25 ) values.capture += 1]
</surveypage>

<slider cap1_slider1>
/ range = (0, 100)
/ increment = 1
/ slidersize = (80%, 50%)
/ position= (10%, 35%)
/ showtooltips = false
</slider>

<slider cap1_slider2>
/ range = (0, 100)
/ increment = 1
/ slidersize = (80%, 50%)
/ position = (10%, 65%)
/ showtooltips = false
</slider>

<slider cap2_slider1>
/ range = (0, 100)
/ increment = 1
/ slidersize = (80%, 50%)
/ position= (10%, 35%)
/ showtooltips = false
</slider>

<slider cap2_slider2>
/ range = (0, 100)
/ increment = 1
/ slidersize = (80%, 50%)
/ position = (10%, 65%)
/ showtooltips = false
</slider>

<text slidercap_remind>
/ items = ("Drag both sliders COMPLETELY to the correct responses, then click SUBMIT.")
/ hjustify = center
/ vjustify = center
/ fontstyle = ("Arial", 4%, true)
/ position = (50%, 15%)
/ txcolor = (0, 191, 255)
</text>

<text cap1_q1>
/ items = ("What was shown in the previous image?")
/ hjustify = center
/ vjustify = center
/ fontstyle = ("Arial", 3%, true)
/ position = (50%, 30%)
</text>

<text cap1_l1>
/ items = ("telephone")
/ fontstyle = ("Arial", 2.25%, true)
/ position = (10%, 42%)
</text>

<text cap1_r1>
/ items = ("hot chocolate")
/ fontstyle = ("Arial", 2.25%, true)
/ position = (90%, 42%)
</text>

<text cap1_q2>
/ items = ("Are you paying attention to these questions?")
/ hjustify = center
/ vjustify = center
/ fontstyle = ("Arial", 3%, true)
/ position = (50%, 60%)
</text>

<text cap1_l2>
/ items = ("Yes, I am.")
/ fontstyle = ("Arial", 2.25%, true)
/ position = (10%, 71%)
</text>

<text cap1_r2>
/ items = ("No, I am not.")
/ fontstyle = ("Arial", 2.25%, true)
/ position = (90%, 71%)
</text>

<trial capture2>
/ stimulustimes = [0 = milk_slide_pic]
/ timeout = 3000
/ validresponse = (0)
/ branch = [surveypage.cap2_surv]
</trial>

<surveypage cap2_surv>
/ questions = [1 = cap2_slider1; 2 = cap2_slider2]
/ stimulusframes = [1 = cap1_q1, cap2_l1, cap2_r1, slidercap_remind; 2 = cap1_q2, cap1_l2, cap1_r2, slider_remind]
/ showpagenumbers = false
/ showquestionnumbers = false
/ finishlabel = "Submit"
/ navigationbuttonfontstyle = ("Arial", 2.5%, true)
/ nextbuttonposition = (46.75%, 85%)
/ timeout = 10000
/ ontrialend = [if (slider.cap2_slider1.response <= 25 || slider.cap2_slider2.response <= 25) 
    values.slider_correct = 1 else values.slider_correct = 0]
/ ontrialend = [if (slider.cap2_slider1.response <= 25 ) values.capture += 1]
/ ontrialend = [if (slider.cap2_slider2.response <= 25 ) values.capture += 1]
</surveypage>

<text cap2_l1>
/ items = ("milk")
/ fontstyle = ("Arial", 2.25%, true)
/ position = (10%, 42%)
</text>

<text cap2_r1>
/ items = ("racecar")
/ fontstyle = ("Arial", 2.25%, true)
/ position = (90%, 42%)
</text>
-------------------------------------------------
              ACCURACY CHECK
-------------------------------------------------
<trial underaccuracy>
/ stimulusframes = [1=scorereport; 2=recommend; 3 = under]
/ validresponse = (lbuttondown)
/ recorddata = false
</trial>

<text scorereport>
/ items = ("~tYour accuracy in identifying alcoholic beverages was <%expressions.alc_percent%>%. ~r~r
 Your accuracy in identifying non-alcoholic beverages was <% expressions.nonalc_percent %>%.")
/ hjustify = center
/ vjustify = center
/ fontstyle = ("Arial", 3.5%)
/ position = (50%, 25%)
/ size = (100%, 30%)
</text>

<text recommend>
/ items = ("~tEither one or both of these accuracies is UNDER our 75% requirement, which was outlined in our consent form.~n 
 If you submit this HIT, we will reject it. We recommend you return the hit so as not to impact your rating.~n
 Please press Ctrl+Q to exit.~n~n
 Thank you for participating, and best of luck.")
/ hjustify = center
/ vjustify = center
/ fontstyle = ("Arial", 2.5%, true)
/ position = (50%, 55%)
/ size = (100%, 30%)
</text>

<text under>
/ items = ("UNDER our 75% requirement,")
/ hjustify = center
/ vjustify = center
/ fontstyle = ("Arial", 2.5%, true)
/ position = (52.84%, 44.79%)
/ txcolor = red
</text>

-------------------------------------------------
              CAPTURE CHECK
-------------------------------------------------
<trial nocapture>
/ stimulusframes = [1=accreport; 2=recommend2]
/ validresponse = (lbuttondown)
/ recorddata = false
</trial>

<text accreport>
/ items = ("~tOut of our 4 mandatory attention checks, you passed <% values.capture %>.~r~r
This is under our attention check requirement, which was outlined in our consent form.")
/ hjustify = center
/ vjustify = center
/ fontstyle = ("Arial", 3.5%)
/ position = (50%, 35%)
/ size = (100%, 30%)
</text>

<text recommend2>
/ items = ("~tIf you submit this HIT, we will reject it. We recommend you return the hit so as not to impact your rating.~n
 Please press Ctrl+Q to exit.~n~n
 Thank you for participating, and best of luck.")
/ hjustify = center
/ vjustify = center
/ fontstyle = ("Arial", 2.5%, true)
/ position = (50%, 65%)
/ size = (100%, 30%)
</text>


-------------------------------------------------
              END
-------------------------------------------------
<trial end>
/ pretrialpause = 250
/ posttrialpause = 250
/ stimulustimes = [1=end]
/ validresponse = (57)
/ inputdevice = keyboard
/ recorddata = false
</trial>

<text end>
/ items = end
/ hjustify = center
/ vjustify = center
/ fontstyle = ("Arial", 2.5%, true)
/ size = (90%, 80%)
/ position = (50%, 50%)
/ select = sequence
/ resetinterval = 0
</text>

<item end>
/1 ="The tasks are now complete. You scored above 75% in accuracy and passed all of our attention checks.~r~r
Thank you for participating in this validation survey! We will be in touch for a follow-up with bonus payment in a few weeks.~r" 
</item>



I'm sure it's a total mess. I also think I've yet to fully grasp values & expressions.

Thanks, as ever, for the feedback.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
ldobb - 8 Years Ago
Dave - 8 Years Ago
ldobb - 8 Years Ago
Dave - 8 Years Ago
ldobb - 8 Years Ago
                         Dave, I think I figured it out! I split the /ontrialend into two...
ldobb - 8 Years Ago
ldobb - 8 Years Ago
                         You have <picture alc_pics> / items =...
Dave - 8 Years Ago
                             So, I did this again with two sets of pictures (alc_picsL) and...
ldobb - 8 Years Ago
                                 <block stimuli> / trials = [1-72 = noreplace( arrowL, arrowL,...
Dave - 8 Years Ago
                                     Nice catch, whoops. Still, when I run a tes.t, it doesn't show...
ldobb - 8 Years Ago
                                         Are all of my selectionmodes correct? I probably have them wrong....
ldobb - 8 Years Ago
                                             <trial arrowL> / ontrialbegin = [values.probe_alc_pos =...
Dave - 8 Years Ago
                                                 P.S.: For a simple illustration that may clarify the above, see the...
Dave - 8 Years Ago
                                                     That's super helpful, thanks so much for that. I'm now thinking the...
ldobb - 8 Years Ago
                                                         I've tried to explain this before in this thread. To quote the...
Dave - 8 Years Ago
                                                             I see what you mean. Should I tie them to items? Get rid of the...
ldobb - 8 Years Ago
                                                             I see what you mean. Should I tie them to items? Get rid of the...
ldobb - 8 Years Ago
ldobb - 8 Years Ago
Dave - 8 Years Ago
                 That was it! Dave, you're the best.
ldobb - 8 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search