Run Conditions

72 views
Skip to first unread message

Collin

unread,
Sep 3, 2014, 4:00:13 PM9/3/14
to sophie-c...@googlegroups.com
Hi, I am trying to program an experiment where I would like for certain stepgroups to only appear when certain conditions are met. In particular, when one variable is smaller than another variable. I see how to control this based on player types, but it looks like there should be a spot to pretty easily enter this information, I just don't know what form it should be in. Such as if(a>b){participate=1;} else{participate=0;}, or something like that. Thanks!

Collin

Achim Hendriks

unread,
Sep 4, 2014, 8:21:43 AM9/4/14
to sophie-c...@googlegroups.com
Hi Collin,

the solution to your requirement is to specify a Run Condition Script for the stepgroup you want some participants to skip. To set a such a script open the Edit Stepgroup View from the Treatment Procedure (either by clicking the button at the end of the line or by double clicking on the stepgroup line). There you can use something like:

>>>

$input = $variableApi->getPE('input');
$threshold = $variableApi->getEE('threshold');

if ($input < $threshold)
{
  return false;
}
else
{
  return true;
}

<<<

Below the Run Conditon Script you can than also choose whether returning false will skip the whole stepgroup or just the current stepgroupLoop.

Run Condition Scripts for stepgroups have been introduced in Version 3.0.0. If you are running on an older version you will have to do a little more work and add your condition to each step.

Best
  Achim


Am 03.09.2014 22:00, schrieb Collin:
Hi, I am trying to program an experiment where I would like for certain stepgroups to only appear when certain conditions are met. In particular, when one variable is smaller than another variable. I see how to control this based on player types, but it looks like there should be a spot to pretty easily enter this information, I just don't know what form it should be in. Such as if(a>b){participate=1;} else{participate=0;}, or something like that. Thanks!

Collin
--
You received this message because you are subscribed to the Google Groups "SoPHIE Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sophie-communi...@googlegroups.com.
To post to this group, send email to sophie-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/sophie-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/sophie-community/fcaba2a6-16d3-4ad0-b882-e79e57232a0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
Heinrich W. Risken Stiftungslehrstuhl
für Unternehmensführung und Unternehmensrechnung
Universität Osnabrück
Rolandstraße 8
49069 Osnabrück
Germany

Laboratory for Economic and Accounting Research (LEAR)
http://www.lear.uos.de

Phone: +49 541 - 969 - 2727
Mail: achim.h...@uos.de

Collin

unread,
Sep 13, 2014, 2:58:33 PM9/13/14
to sophie-c...@googlegroups.com
Thank-you so much! That is a huge help.
Reply all
Reply to author
Forward
0 new messages