Placing large group relations into pedestrian dynamics

Understanding inﬂuences on pedestrian movement is important to accurately simulate crowd behaviour, yet little research has explored the psychological factors that inﬂuence interactions between large groups in counterﬂow scenarios. Research from social psychology has demonstrated that social identities can inﬂuence the micro-level pedestrian movement of a psychological crowd, but this has not been extended to explore behaviour when two large psychological groups are co-present. This study investigates how the presence of large groups with different social identities can affect pedestrian behaviour when walking in counterﬂow. Participants ( N = 54) were divided into two groups and primed to have identities as either ‘team A’ or ‘team B’. The trajectories of all participants were tracked to compare the movement of team A when walking alone to when walking in counterﬂow with team B, based on their i) speed of movement and distance walked, and ii) proximity between participants. In comparison to walking alone, the presence of another group inﬂuenced team A to collectively self-organise to reduce their speed and distance walked in order to walk closely together with ingroup members. We discuss the importance of incorporating social identities into pedestrian group dynamics for empirically validated simulations of counterﬂow scenarios.


Introduction
Pedestrian models are used to increase safety at mass events by predicting and monitoring crowd behaviour, such as at the Olympic Games [1], the Hajj [2], and in transport hubs for both everyday scenarios and emergency evacuations [3,4]. These models are based on core assumptions about the motivations behind pedestrian behaviour, but the factors underlying collective behaviour are widely debated. One approach suggests that pedestrians act as they would as individuals according to their personality (e.g. [5]). Other research proposes that pedestrians are guided by visual cues in the environment, such as the distance of pedestrians to obstacles and others [6]. A third area of research focusses on how group formations both influence and are influenced by crowd flow [7].
Analysis on the role of individual differences, environmental and social cues, collision avoidance through preferred proximity, and group formations have made important contributions to understanding pedestrian behaviour. However, these approaches have predominantly dealt with individuals receiving social cues, or small groups walking through a crowd. They are yet to address the underlying psychological factors that make a 'group', or incorporate current developments in social psychology to address interactions between members of large groups, and how they are influenced by the presence of another large group in counterflow. Moreover, despite the regular occurrence of crowds in counterflow such as at different groups of fans at sporting events and music festivals, most research has looked at when small groups of people walk in counterflow through the assumption that large groups break into smaller ones. Little research has addressed what happens when two large groups come into counterflow.
The present study investigates the impact on pedestrian behaviour when a large group walks on their own, and when two large groups with different social identities walk in counterflow. We examine how self-organising behaviour between fellow (in)group members to maintain close proximity to one another through regulation of their speed and distance walked, when a) walking alone and b) when walking in counterflow to another (out)group.

Approaches to pedestrian behaviour
Multiple avenues of research in pedestrian dynamics have sought to explain behaviour in crowds to increase the granularity of simulations. One area of research has suggested that pedestrian behaviour in crowds is simply a derivative of individual differences within the crowd, such as emotions (e.g. [8,9]), personality traits [10][11][12], spatial knowledge and route preference [13][14][15], and cautiousness and responsiveness to signals [16]. For example, a virtual evacuation experiment by Moussaïd and Trauernicht [6] suggest that cooperation during emergencies derives from an individual's personality type and predisposition to weight the costs of helping against survival. While these approaches are important to model crowds of individuals during ingress or egress scenarios, they reduce crowd flow and interactions between pedestrians to how individuals can best reach targets while manoeuvring around others. Crucially, they do not include macro-level social influences on behaviour and so neglect the role of connections between pedestrians on movement. For example, previous research from crowd psychology [17] demonstrated that a crowd of pedestrians reduced their walking speed and increased their distance walked to remain in close proximity to one another when they perceived one another to be fellow group members. Thus, rather than manoeuvring around one another to reach a target, the group members manoeuvred around one another to remain together on the basis of shared group membership.
A second area of research has treated pedestrian behaviour as a response to social information in the environment through the perception of others' behaviour and how this can influence individual navigation through crowds. This research suggests that pedestrians are influenced by where other pedestrians look and walk [18][19][20] and how quickly other pedestrians respond at the beginning of an evacuation [21][22][23][24]. Pedestrian dynamics in counterflow have been explored through the formation of walking lanes to improve flow [25][26][27], or manoeuvring away from others to avoid collisions based on assumptions of preferred proximity around pedestrians [28][29][30][31]. For example, Zeng, Nakamura, and Chen [30] modelled a pedestrian crosswalk scenario where pedestrian movement is defined by repulsive forces to maintain a desired distance from surrounding pedestrians, temporarily manoeuvring to avoid collision before resuming their desired route choice. Research exploring the effects of other pedestrians on movement makes substantial contribution to understanding social factors on pedestrian behaviour. However, it examines how unconnected individuals are influenced by the behaviour of other individuals. This approach does not address the effect of pre-existing connections between crowd members, or how groups collectively self-organise to move together, rather than individuals being influenced to move in the same direction. Crucially, the rules governing collision avoidance often assume a fixed desired distance between pedestrians where close proximity is a result of high crowd density rather than preference to be close to others. This approach does not account for the variable behaviours of large groups who may seek to stay together in close proximity, such as can be seen in fans of the same team entering sporting events, or attendees of music festivals huddled together as they watch performers.
A third area of research that does investigate group behaviour in pedestrian movement focuses on the role of group formations in pedestrian flow, suggesting that large groups either break into single lanes to ease flow (e.g. [32]), or divide into subgroups and maintain formation (e.g. [33]). For example, Moussaïd, Perozo, Garnier, Helbing, and Theraulaz [34] analysed 1, 500 pedestrian groups to examine how groups create and maintain formations as they progress through a crowd. They suggest that group members will aim to walk side-by-side when in a crowd of low density, or a 'V' formation to ease communication as they progress through a higher density crowd. However, as the crowd density increases these formations can be broken to allow faster movement. A similar finding occurs in Köster, Seitz, Treml, Hartmann, and Klein [35] who found that students in an evacuation would try to walk abreast to enhance communication. This principle was extended by Vizzari et al. [7] to analyse the effect of group size on pedestrian flow and formation. Vizzari et al. manipulated the size of the group to have pedestrians walk together in counterflow either as single pedestrians, pairs, a group of three, or a group of six, and found that pedestrian evacuation time was increased when the groups maintained their formations throughout the crowd.

Incorporating inter-and intragroup psychology
To understand large group behaviour, a useful distinction can be drawn between physical crowds and psychological crowds [36]. Physical crowds comprise unconnected individuals and small groups of friends or family members who share the same physical space at the same time, for example crowds in shopping centres and transport hubs. In psychological crowds, members of the crowd share the sense of being in the same group with one another and act in accordance with their identity as a member of that group. A single physical crowd may contain none or multiple psychological crowds within it, such as at a transport hub with unconnected commuters and a psychological crowd of fans of the same team travelling to an event. Self-categorisation theory (SCT) [37] explains that when a person's identity as a member of that group (their social identity) is salient, a process of depersonalisation occurs where the individuals apply group characteristics to themselves. It demonstrates how people categorise themselves and others into groups and how social identities can affect people's perceptions and feelings. One way that people act in terms of their group identities is how they perceive themselves to be similar to members of their ingroup compared to members of another outgroup. Here, the meta-contrast principle [38] contributes to the salience of the identity and indicates that a group is more likely to be perceived as a group if the differences between ingroup members are smaller than the differences between the ingroup and outgroup members.
Research in this area has shown how shared social identities increased people's feelings of safety in dangerous crowd densities at the Hajj [39], mitigated perceptions of the cold at the Magh Mela festival [40], and increased positive experience amongst festival attendees, protestors, and football supporters [41]. Shared social identities can also influence the behaviour of crowd members. For example, during a free outdoor music event on Brighton beach, 2002, the crowd reached such a high density that emergency services were unable to enter the crowd. However, the shared social identity amongst the attendees led the crowd to self-organise to provide other group members -who were previously strangers -with water and coordinate their movement during egress to evacuate the beach safely [42]. There is also evidence that a shared social identity led survivors of the July 7th 2005 London bombings to come together to apply first aid to one another and organise escaping safely in orderly queues in the absence of emergency services [43]. The effect of group identification on evacuation behaviour has also been demonstrated by Drury et al. [44] using a virtual reality simulation where participants had to escape a fire in an underground rail station. Their research indicated that cooperation amongst participants increased among those who most highly identified with the group due to the shared fate induced by the evacuation, and this decreased competitive behaviour such as shoving and pushing during egress. Social identity has also been shown to affect the maintenance of physical distance between people. Novelli, Drury, and Reicher [45] found that when participants defined themselves as being in the same group as another person in the room, the participants moved their chairs significantly closer together than if the other person was perceived to be a member of a different group. Crucially, shared social identification affects the proximity of pedestrians to one another. Templeton, Drury, and Philippides [17] demonstrated that pedestrians in a crowd who were primed to share a social identity (i.e., a psychological crowd) walked in closer proximity to one another, further, and slower, than when they had not been primed (i.e. were simply part of a physical crowd). Moreover, the pedestrians in the psychological crowd did not split into small subgroups as suggested by previous literature, instead opting to stay close to fellow group members. The maintenance of close proximity among the psychological crowd in Templeton, Drury, and Philippides is contrary to models of large groups in counterflow based on unconnected individuals whose interactions are based on repulsion forces to avoid collision (e.g. [28][29][30]), or who break into smaller groups to ease flow (e.g. [32][33][34]).

The current study
Overall, research from social psychology provides prima facie evidence that large groups with a shared social identity collectively self-organise their behaviour with ingroup members, and that people prefer to be closer to ingroup than outgroup members. This study aims to extend the work of Templeton, Drury, and Philippides [17] to examine whether pedestrians with a shared social identity will coordinate their behaviour with their ingroup to be closer to ingroup members than outgroup members. Specifically, we analyse pedestrian movement to determine how the presence of an outgroup with a different social identity affects the proximity between participants. We utilise the meta-contract principle through the repeated-measures design explore whether proximity is increased in the presence of an outgroup, and the consequences this has for pedestrian flow.
Using a minimal group manipulation, we created two different psychological groups (team A and team B) and explored their movement behaviour when 1) team A walked alone, and 2) when team A walked in counterflow to team B. We hypothesised that, in the presence of an outgroup, group members will regulate their speed and distance to remain closer together with their ingroup.

Ethics
Full ethical clearance was obtained for this study and the research was performed in accordance with the relevant ethical guidelines. The researchers obtained informed consent from all participants who were recruited to take part in the study on walking behaviour.

Procedure
Participants were selected based on their attendance at a second year Psychology lecture at the University of Sussex, and were recruited under the guise of participating in a study researching how people walk. Before leaving their lecture, participants were allocated into team A (N = 28) or team B (N = 26) using a random number generator. Initially there were 28 participants in both teams, but two participants from Team B left before the first phase of the study.
We used standard forms of social identity manipulation based on the minimal group paradigm [46] by priming participants to perceive themselves as being in different groups [47]. To do this, we primed separate identities for the two teams with the aim of making their identities as team A or team B members more salient than any pre-existing bonds amongst the participants. After the participants exited the lecture theatre, research assistants instructed them to look at the tables on opposite sides of a courtyard. One table had a large 'Team A' sign, while the other table had a large 'Team B' sign, and participants were instructed to go to their allocated team table. Participants were given baseball caps as further identity primes; participants in team A were provided with black baseball caps with an 'A' logo on the front, and participants in team B were given red caps with 'B' logo on them. These identity primes 1) allowed participants to perceive which team the other participants were in to see who was an ingroup or outgroup member, and 2) enabled the researcher to allocate participants into the correct groups during the coding of the video data.

Social identity manipulation check
Prior to walking, participants were given questionnaires based on group identification measures [48] to measure their identification with members of their own team (ingroup members) versus identification with members of the other team (outgroup members). First, participants were asked to declare which group they were allocated to, and to provide the name of the other group. Participants were then asked to rate their level of identification towards their own team and the opposite team, using identical questions about their bond, affinity, and commitment towards each group on a Likert scale of 1 (not at all) to 7 (very much) (adapted from Leach, van Zomeren, Zebel, Vliek, & Ouwerkerk [48]). The questions were; 'I feel a bond with the people in this group', 'I feel an affinity with this group', and 'I feel committed to this group' (ingroup identification items α = 0.846; outgroup identification items α = 0.854; full questionnaire provided in Appendix A).

Behavioural data
The research took place on a main pathway through the University of Sussex campus. Filming was conducted with a Nikon PixPro AZ361 digital camera with a 36x wide 24 − 864 mm equivalent Aspheric HD Zoom Lens with no zoom or lens distortion, and took place from a low bridge above the path the participants walked along to enable object tracking of their movement. A section of the path (length = 5 metres, width = 3.75 metres) was selected as it was wide enough for the two teams to walk in counterflow without reaching a dangerous density. This path serves as the main route between their lecture where the study began, and two areas at opposite ends of the path where participants were asked to walk to (please see Fig. 1 for a map of the locations, where the area that was filmed is indicated by the dashed line). tables where they filled out questionnaires, and the areas they were instructed to walk to. The area that was filmed is indicated by the dashed red line.
Behavioural data was collected in three phases to achieve footage of team A walking alone and team A and B walking in counterflow. In the first phase, team A were given the instruction 'people who are in team A, please walk to [Area 1] where you will be met by a research assistant who will give you further instructions'. When team A arrived there, the assistant sent them to Area 2 on the other side of campus which enabled the experimenters to film team A walking along a pathway to obtain data of the group walking alone. This data provided a comparison of how the team walked when not in counterflow with another group who shared a different social identity.
In the second phase, once team A had arrived at their destination, participants in team B were given the instructions 'people who are in team B, please walk to [Area 1] where you will be met by a research assistant who will give you further instructions'. This location was chosen as it positioned team A and team B on opposite sides of the bridge where filming was conducted.
In the final phase, the research assistants instructed team A to walk back to Area 1 and team B to walk to Area 2. To reach their destinations, the participants would need to walk along the main path in counterflow. When the teams walked in counterflow, 4 unplanned pedestrians walked the same direction as team A and 1 pedestrian walked in the same direction as team B (we were not able to cordon the area for health and safety reasons). These extra pedestrians were not included in the analysis for speed or distance, but were included when using the number of people present in the area to calculate proximity of pedestrians.
To calculate the positions of the pedestrians, we transformed their trajectory coordinates from the original camera footage taken from the bridge to a directly top-down planar view. This was conducted to obtain the projected coordinates of the centre of each pedestrians' body onto the floor. The transformation matrices were calculated using the corners of a 3.75 metre by 5 metre rectangle marked on the pathway, using the MatLab function maketform for a 'projective' mapping. The mapping procedure used to calculate the transformation matrix assumes that all the points being mapped from the camera image are on the same flat surface. If we had used the corner positions on the pathway, this would have required us to infer the point on the floor beneath each pedestrian based on their feet position. However, the pedestrians' feet were not sufficiently visible to track consistently due to the density of the groups and the angle of filming from the bridge which caused occlusion of the feet. Instead, the positions of the pedestrians' heads were identified using a custom MATLAB script created by the authors to manually record the coordinate positions of the participants from the footage every 5 frames (frame rate 24 frames per second, approximately 1/3 of a step).
To create the transformation matrix, we needed the points to be in the same plane as people's heads. We recorded the position of participants' heights in space using a pole 169 cm long (the midpoint between the average height of men and women in the UK) placed vertically at each of the corner positions on the 3.75 by 5 metres grid. The transformation to a top down view assumes that each participant's head was at a constant height of 169 cm leading to errors in the transformed top-down positions. By comparing transformed data with data inferred from feet positions (from a sample of images where the feet were clearly visible) the median and interquartile ranges of the errors were 21±14 cm for both crowd conditions. The camera did not move between the conditions where team A walked alone and when teams A and B walked in counterflow. Importantly, within each participant the error was systematic (as it was largely due to height being over/under estimated rather than the swaying/bobbing of heads as participants walked) and so measures of speed and distance travelled, which rely on the difference between positions (see below), were largely unaffected by this issue.

Speed and distance of movement
The positions of the participants, transformed into the top-down planar view, were used to ascertain the distance walked, speed of movement, and the proximity between individuals. Positions of the participants were calculated every 5 frames (frame rate 24 frames per second, approximately 1/3 of a step) and distance was calculated by summing the distance between the coordinates of each projected location. The speed was then calculated from this total distance via speed = distance/time, where the time was calculated from the number of positions used to calculate the distance (i.e. time between each position = 0.2085 s, calculated from 1 second divided by the frame rate of 24 frames per second, multiplied by 5 for the frame gap; thus if we have n positions, we sum n − 1 distances between positions and divide this by (n − 1) · 0.2085). The speed and distance were measured for team A when walking alone, and both team A and team B when walking in counterflow to determine whether there was a difference in speed and distance when the team A walked alone and when they walked in counterflow. Total distance reported is the cumulative distance between each projected coordinate (the projection of the centre of the participants' body viewed from above) from the first frame in which their head first enters the footage to when it exits the footage (as the head is the most visible part of the person).

Proximity between ingroup members
A snapshot of each pedestrian's projected locations was taken every 4.17 seconds (100 frames) to produce the positions of the pedestrians at 8 time-points. The space around each pedestrian was calculated using Sievers's [49] method for Voronoi decomposition, with the tessellation areas given an upper bound of 1 metre to avoid inflating the space around individuals walking on the periphery of the groups. Following this, Latent Growth Curve Modelling was used to determine whether 1) group membership was a predictor of tessellation areas over three time points in the counterflow condition, and 2) the number of people present in the area at different time points predicted the tessellation areas by using the number of people present as a time-varying covariate.

Speed and distance measures
Kolmogorov-Smirnov tests revealed that when team A walked alone neither their speed or distance deviated significantly from normal. In the counterflow condition, the speed of neither team A or B deviated significantly from normal; however, the distance of both teams were non-normal. When examining tessellation areas across the eight time points, the tessellation areas of team A were normal when walking alone, but tessellation areas for team A and team B in counterflow were non-normal (see Tab. 1

Tessellation areas
Kolmogorov-Smirnov tests revealed that the tessellation areas of team A when walking alone were normal across the eight time points, but the tessellation areas for team A when walking in counterflow and team B were non-normal across the 5 time points (see Tab. 1 for D-values, degrees of freedom, and p-values). As such, a Kruskal-Wallis test was used and revealed a significant difference between the tessellation areas of team A when alone (Mean rank = 116) than when in counterflow (Mean rank = 55.38), H(1) = 65.67, p < 0.001, providing support for our hypothesis that team A members maintained closer proximity in the presence of team B (see Fig. 2   areas were affected by group or it could be just number of people. Latent Growth Curve Modelling was used to ascertain 1) whether group was a predictor of tessellation areas across three time points, and 2) the effect of the number of people in the area on the tessellation areas. We divided time into eight equally spaced time points at 4.17 seconds apart. Due to participants walking through the footage, each participant was present for approximately three-points of the eight time points. As such, we used the tessellation areas of participants from when their first, second and thirds tessellation areas were calculated (Time 1, Time 2, and Time 3 at 4.17 seconds apart). The intercept was weighted as 1 on each time point to constrain them as equal. The slope was weighted on the time points as 0 for Time 1, 1 for Time 2, and 2 for Time 3, as the times were equally spaced at 4.17 seconds apart. The intercept and slopes were extracted across Time 1, Time 2, and Time 3, and used as estimates of (a) baseline tessellation areas before coming into contact with the outgroup (Time 1) and (b) increase or decline in tessellation areas across the successive time points when the groups are in counterflow. To determine whether the number of people predicted tessellation areas, we used the number of people in the area at each time point as a time-varying covariate with the corresponding tessellation areas of the participants at those time points. Group was regressed onto the intercept and slope, and participants were coded in their relevant groups (team A = 1, team B = 0) (see Fig. 3). Robust maximum likelihood was used due to the non-normal distributions of team B, and we chose full information maximum-likelihood (FIML) as there were 5 missing datapoints across Time 2 and Time 3 due to people moving outside the parameters of the footage.
We used the criteria suggested by Hu and Bentler [50] to assess model fit, where the model fit is based on RMSEA < 0.06, SRMR < 0.08, CFI > 0.95. This led us to consider that our model provided overall adequate fit, RMSEA = 0.07, SRMR = 0.07, CFI = 0.98, with a non-significant chi-square, χ 2 (15) = 9.05, p = 0.249. In the model, the number of people was a non-significant predictor on tessellation areas at Time 1, β = −0.849, p = 0.073, but a significant predictor at Time 2, β = −0.253, p < 0.001, and Time 3, β = −0.387, p < 0.001, indicating that the tessellation areas were influenced by the overall number of people in the area, providing support for our hypothesis (for path diagram, see Fig. 3). As can be seen in Fig. 3, the tessellation areas decrease as the number of people in the area increase, indicating that participants move closer to the ingroup when in the presence of an outgroup. In Fig. 3, tessellation areas are taken from each pedestrian's first occurrence in the footage (Time 1) and subsequent two time points (Time 2 and  Time 3). The x-axis denotes the data binned between ranges of people present to show mean tessellation areas as number of people present in the area increases. The means and standard deviations for each group across all eight time points and corresponding number of people in the area are presented in Tab. 3. Using group as a predictor on the intercept revealed that the groups have significantly different initial tessellation areas at Time 1, β = 0.550, p < 0.001, with people in team B having larger initial tessellation areas (see Fig. 4). However, as can be seen in Fig. 4, the tessellation area for both groups decreased in the presence of the outgroup overall.  Table 3 The mean tessellation areas and standard deviations for both teams in counterflow as the number of people in the area increases.

Combining speed, distance, and proximity for team A alone and in counterflow
In summary, when walking alone, team A maintained close proximity with ingroup members, walked faster, and walked further. In the counterflow condition, team A maintained closer proximity and reduced their speed and distance. This provides support for our hypothesis that participants regulated their movement and speed to remain together, and that the participants regulated their speed and distance walked to maintain a closer proximity with ingroup members when outgroup members were present 1 . Notably, this occurred on quite a narrow path of 3.75 metres in width that was surrounded by grass the participants could have walked on. Instead, participants elected to move closer together. Participants also could have chosen to move through the crowd faster by splitting in to smaller groups or in to single lane formation. However, participants regulated their behaviour in order to keep formation as a group on the path, electing to stay two, three, or four people abreast and move in closer proximity.

Discussion
This study suggests that the counterflow of the outgroup with a different social identity motivated pedestrians in team A to self-organise to remain in closer proximity with ingroup members than when the outgroup was not present. The manipulation check found that participants reported higher identification with members of their ingroup than the outgroup, which supports the suggestion that participants saw their own team as ingroup and the other team as a different (out)group. Therefore it was being in counterflow with a group that had a different social identity, and not another factor, that led to differences in the observed behaviours. Specifically, counterflow with a group with a different social identity had three key behavioural effects. First, team A self-organised to be move closer together in the presence of an outgroup with a different social identity. Second, team A walked slower when walking in counterflow to an outgroup compared to walking alone. Third, team A reduced their distance when in walking in counterflow to an outgroup compared to walking alone. Together these results suggest that participants prioritised remaining together with ingroup members over easing pedestrian flow. This is particularly interesting because participants could have walked on the grass instead of the quite narrow 3.75 metres in width path, but instead they moved into closer proximity.
The behaviour we see aligns with some aspects of group dynamics but with some important differences highlighting the effect of psychological groups in counterflow. The attempt by participants to remain with ingroup members supports the formations found in the low density crowds reported by Moussaïd et al. [34], but instead of breaking up in higher densities, participants maintained their formations even as the number of people in the area increased. The participants attempted to stay abreast while walking, replicating the formations found by Köster et al. [35], and decreased their speed in order to stay together, repeating the small group behaviour found in Vizzari et al. [7].
However, the importance of social identity in counterflow is seen in inconsistencies in these results with much research in pedestrian flow. For example, the participants did not form the multiple single lanes found by Helbing et al. [32] instead electing to create two large lanes to stay together. Moreover, in contrast to Moussaïd et al. [5], they did not choose the direction of movement which would least decrease their speed, instead prioritising staying with ingroup members and thus moving more slowly. These findings suggest that when considering pedestrian counterflow, research should consider that groups with a shared social identity prioritise staying together even when it impedes their speed.
There are potential limitations to this study pointing to avenues for future research. Due to the angle of filming from the bridge, it was only possible to capture a section of the path where the teams were only six metres away from coming into contact. This meant that participants were already in the process of manoeuvring to take over a section of the path compared to the outgroup. Future research should aim to examine behaviour beginning from a point when they are further apart and could explore at which point the groups begin to alter their behaviour. Moreover, this path was quite narrow and the participants may have perceived the edge of the path as a barrier instead of walking on the grass. Future research should examine proximity and group formations when there is more space available for the pedestrians to move through. Although there were only five additional pedestrians to our primed participants in the counterflow condition as we were unable to cordon the area, ideally other pedestrians would not have been present to evaluate how the teams interacted solely with one another.
Another potential limitation is that we do not have a conventional control condition. Instead, we take the behaviour of team A walking alone as our baseline and compare it to the behaviour when in the presence of another psychological group. Two issues must be addressed here. First, a control condition where we do not prime social identities in our crowd would mean that we were testing a physical crowd and therefore not address our research question of how a psychological crowd walks when alone compared to in the presence of another psychological crowd. Second, recruiting participants to walk in a physical crowd (where there is no shared social identity) would be very difficult as recruiting people to participate and complete a task together could be sufficient to create a social identity between the participants, thus scuppering the point of having a group without a shared social identity and essentially recreating our existing condition where team A walk alone. Another limitation is that we were unable to obtain footage of team B walking alone to compare their behaviour to the counterflow condition, thus having to compare team A in both conditions only. Future research would benefit from replicating this study where both groups are filmed prior to walking in counterflow to obtain a baseline of group walking behaviour in order to compare how the presence of another group influenced their behaviour more thoroughly. Finally, we analysed 61 participants across three time points for Latent Growth Curve Modelling. Although there is debate about the optimum number of participants needed to reliably estimate growth models (see [51], for an overview), this is dependent upon the complexity of the model and variance explained by the model. Our model indices imply that the model was an adequate fit, but future research using Latent Growth Curve Modelling should aim to have more participants for increased reliability.
Large psychological groups and psychological crowds who move on their own or in counterflow are a common occurrence in mass crowd events. For example, ingress and egress of fans at concerts, festival attendees moving to different stages, sports fans of opposing teams entering or leaving a stadium, protests and counter-protests, large groups travelling to and from these events at transport hubs, and emergency evacuations. Often, these psychological groups and crowds are present within a larger physical crowd. The previous research of Templeton, Drury, and Philippides [17] demonstrated that sharing a group identity caused ingroup members to collectively self-regulate to walk together. This study extends this research and finds that this effect is increased when in the presence of another psychological group in counterflow, leading participants to decrease their speed and distance in order to maintain closer proximity with ingroup members. This is contrary to the research of Helbing et al. [20] and Moussaïd et al. [5] which suggests that groups split up to improve crowd flow; in our experiment participants with a shared identity prioritised staying together over moving quickly. One reason for this could be that Helbing et al. and Moussaïd et al. were generalising crowd behaviour from the physical crowds used in their research. In order to adequately plan for crowd safety, modellers and safety practitioners should consider the behavioural differences between physical crowds and psychological crowds. Crucially, they should incorporate how people with a shared identity prioritise moving together over easing crowd flow, and how this can affect the ingress and egress of both psychological crowds on their own, and psychological crowds within physical crowds.
Data accessibility The data is provided as supplementary material (supporting information). The original footage has not been uploaded to maintain anonymity of the participants. For access to the original footage, interested parties should contact the corresponding author but note that the original footage will be blurred to avoid facial identification of the participants for the sake of their anonymity.

Conflict of interest
The authors state no competing interests that could affect the objectivity of this research.
Author contributions AT, JD, and AP designed the study. AT carried out the recruitment, filming, and pedestrian tracking. AT, JD, and AP participated in data analysis and helped draft the manuscript. All authors gave final approval for publication.
Funding This project is funded by the Engineering and Physical Sciences Research Council (grant EP/L505109/1).