Grouping the participants

The software platform is designed for online human interaction experiments. Therefore, grouping is a big part of SoPHIE and you are able to choose from different options that suit your requirements.

Before making a decision on the actual grouping, the structure of a single groups should be considered. The number of participants in one group and distinct user roles are parameters to think of.

Group Structure

To define the Group Structure in the designer of a treatment, decide on the participant types first. These represent user roles, which might be trustor and trustee in a trust game for example. Sticking to this example the group structure would result in one participant of each type per group, as this game is played in groups of two.

From this point you always decide on how many groups you would like to add to an experiment and not how many participants should participate. In individual experiments without any interaction the number of participants equals the number of groups created.

Group Structure

Pregenerated Grouping

While creating a custom session, the amount of groups can be specified as well as a Pregenerated Grouping.

If we stay with the example of the trust game mentioned in the Group Structure Tr.1 and Te.1 will be grouped together by default throughout the whole experiment and this is what the default pregenerated grouping does.

The random grouping on the other hand generates a new, random grouping for each repetition of each stepgroup. Tr.1 might be grouped with Te.2 in round 1 of the experiment and with Te.6 in round 2.

When an individual experiment without group interaction is conducted, no grouping is required and none should be chosen for the pregenerated grouping, as this saves some loading time, which is required for group creation.

Pregenerated Grouping

Grouping at runtime (MTurk)

When an online experiment is conducted on Amazon Mechanical Turk, a pregenerated grouping is not sufficient. Participants might drop out after reading the instructions and the partners they are already grouped with are stuck in the experiment. Therefore, we created a Waiting Room, which groups participants right after all individual tasks are completed. This reduces the dropout rate to a minimum.

By using this option, participants are waiting a limited amount of time to get matched to another participant. If not enough participants were available to build a group, the other participants drop out after the specified waiting time. You can define the size of the group and the scope of the grouping, as you might want to group participants only for certain tasks before generating new groups. The specifications are shown in the screenshot below.

Waiting Room

The Waiting Room is part of the SoPHIE Labs Premium Steptypes, please contact us to get further information.

Individual Grouping

Certain requirements in terms of the grouping for behavioral research experiments are not covered by the grouping mechanisms mentioned here. For some experiments it might be necessary to have a real random grouping, where participants are guaranteed to compete with a different participant every round and not play with the same partner twice. Another situation might be a different, pregenerated grouping for individual stepgroups.

You can create your own grouping mechanisms by using the grouping API functionalities. Below you can see an example on how to use these. Assuming that a pregenerated grouping with two participants each was used for the first part of the experiment, we would like to have ten participants per group for the rest of the experiment. Participants from the same group stay together in the same group.

$groups = $groupApi->getGroupLabels();

$participantArray = array();
foreach ($groups as $group)
{
    $groupMembers = $groupApi->getGroupMemberLabels($group);

    foreach($groupMembers as $groupMember)
    {
        if (count($participantArray) < 10)
        {
            $participantArray[] = $groupMember;
        }
        else
        {
            $emptyGroups = $groupApi->getEmptyGroupLabels();
            $groupApi->addGroupMembers($participantArray, $emptyGroups[0]);
            $participantArray = array();
        }
    }

    $groupApi->removeGroupMembers($groupMembers, $group);
}

Random Re-Grouping

If you are looking to randomly regroup participants after a certain stage you can take a look at the following example. Please note that this example is used under the assumption that you created an experiment without pregenerated grouping. Also, this should only be used in a lab experiment inside of a Sync Everyone step at the beginning of the new stepgroup. MTurk experiments require more flexibility in terms of the grouping.

$emptyGroups = $groupApi->getEmptyGroupLabels();
$participants = $participantApi->getParticipantLabels();

// randomize the grouping by shuffling participants

shuffle($participants);

// define the group size that you want to have
$groupSize = 2;

foreach ($emptyGroups as $group)
{
    $newGroupMembers = array();
    for ($i = 1; $i <= $groupSize; $i++)
    {
        if (count($participants) > 0)
        {
            $newGroupMembers[] = array_pop($participants);
        }
    }

    $groupApi->addGroupMembers($newGroupMembers, $group, 'stepGroupLabel', 'stepGroupLoop');
}