Millisecond Forums

Aborting Experiment (Informed Consent + Anytime During the Experiment)

https://forums.millisecond.com/Topic11407.aspx

By AAllison - 10/7/2013

Hi,



I've been experimenting with the abort, branching, and abort experiment features, but I still don't really understand how I'm supposed to program what I want.  I have two basic things I'm trying to do:



1) If a participant selects "I disagree" (meaning they do not wish to participate in this experiment) on the Informed Consent, the entire experiment should close out.  The informed consent is in a <trial>.



2) If a participant wants to exit the entire experiment at any time, they should be able to do so.  (Can participants use CTRL+Q to exit also?)



Thank you!



Ashley

By Dave - 10/7/2013

1) If a participant selects "I disagree" (meaning they do not wish to participate in this experiment) on the Informed Consent, the entire experiment should close out.  The informed consent is in a <trial>.


You use the script.abort() function as detailed in the documentation and the example given therein:


<trial consent>
/ ontrialend= [if (
trial.consent.response == 57 ) script.abort();]




[...]




</trial>


The above means: If the spacebar is pressed, the script is aborted. You have to adapt that to the available responses in your consent trial.


2) If a participant wants to exit the entire experiment at any time, they should be able to do so.  (Can participants use CTRL+Q to exit also?)


Yes, CTRL+Q can be used to abort the script at any time.

By AAllison - 10/7/2013

Thank you!  


Is there a way for me to make the following occur:


If the participant clicks "I agree", it takes them through the experiment as normal.


If the participant clicks "I disagree", it takes them to a separate page, which says something like, "You have decided to not participate in the experiment.  Possible alternatives for earning credits include [blah blah blah].  Please press the space bar to exit."  Then they can click the space bar, which takes them out of the experiment.



I would really appreciate some guidance on how to make that happen.



Thanks,



Ashley


By Dave - 10/7/2013

In case of a 'disagree' response, /branch to a <trial> displaying the message you mentioned. Use the script.abort() function as already detailed previously in that message <trial> to abort the script.

By AAllison - 10/7/2013

Hi,


I'm not programming it properly, but I can't figure out what I'm doing wrong.  Here's what I have:




<trial InformedConsentP3>


/ stimulusframes = [1=InformedConsent3; 2=Agree; 3=Disagree; 4=AgreetoPar; 5=DisagreetoPar; 6=FormDate]


/ inputdevice = mouse


/ validresponse = (Agree, Disagree)


/ branch = [if (trial.informedconsentp3.response==Disagree) trial.noconsentexit]


</trial>



<trial noconsentexit>


/ stimulusframes = [1=noconsentexit]


/ ontrialend= [if ( trial.consent.response == 57 ) script.abort();]


</trial>




What should I be putting?  Thank you so much for your help!  I really appreciate this.



Ashley

By Dave - 10/7/2013

<trial InformedConsentP3>


/ stimulusframes = [1=InformedConsent3; 2=Agree; 3=Disagree; 4=AgreetoPar; 5=DisagreetoPar; 6=FormDate]


/ inputdevice = mouse


/ validresponse = (Agree, Disagree)


/ branch = [if (trial.informedconsentp3.response=="Disagree") trial.noconsentexit]


</trial>



<trial noconsentexit>


/ inputdevice = keyboard


/ stimulusframes = [1=noconsentexit]


/ validresponse = (57)


/ ontrialend= [if ( trial.noconsentexit.response == 57 ) script.abort();]


</trial>