# Leader-Follower Role Allocation for Physical Collaboration in Human Dyads
## 2 Methods
### Data Processing  
In each session, motion data of the robot and force measurements from the force sensor were collected. The target sequence and task duration for each trial were logged as well. A table of the gathered data is available as Supplementary Material. Measurements were sorted based on the type of experiment (individual or in collaboration) and the observed subject of the dyad (higher-performing or lower-performing individual). _Determining the higher-performing and lower-performing subjects:_ Each dyad consists of a higher- and a lower-performing partner with their role being determined based on their performance in the individual experiment. To find the optimal method for determining a subjects role in a dyad, their performance was defined in three different ways--based on (a) the average time needed to perform the reaching task, (b) the average maximum velocity of each individual when performing the reaching task, and (c) Fitts' law's index of performance (\(IP\)). The sorting method (a), based on the mean time needed to perform the reaching task, determines the higher- and lower-performing individual by averaging the measured time it took the subject to reach the target throughout all individual trials. This was calculated for each target separately. To calculate the overall mean time needed to perform a reaching task, the calculated mean times for each target were averaged as well. The calculated mean times were used for comparing the two individuals, where the individual with shortest mean time in the individual experiment is determined to be the higher-performing individual. The sorting method (b), which is based on the maximum velocity in individual tasks, defines maximum velocity as the peak value of velocity during the reaching task. An average maximum velocity (\(v_{max}\)) of an individual is calculated by averaging the maximum velocities of each trial and target. In this method, the individual with higher \(v_{max}\) is determined to be the higher-performing individual. The sorting method (c) determines the higher- and lower-performing subject by implementing [PERSON] law's index of performance (\(IP\)). [PERSON] law describes the speed-accuracy trade-off based on the time required to reach a target. As a measure of human performance, [PERSON] proposed a metric called index of performance or \(IP\), which is described as:\[IP=\frac{ID}{MT}, \tag{1}\]  
where \(MT\) is the measured movement time and \(ID\) is the index of difficulty, which has several formats in literature as seen in [20; 21]. In this study, the Shannon formulation [22] was used, which is defined as:  
\[ID=log_{2}(\frac{D}{W}+1). \tag{2}\]  
Here, \(D\) is the distance of the target and \(W\) is the width of the target. The \(IP\) was calculated for all targets in each trial. The calculated \(IP\)s were then averaged within each target. The overall \(IP\) for each subject was then determined by calculating the average \(IP\) from all targets. When comparing the IPs of both individuals, the subject with a higher \(IP\) is determined to be the subject with the higher individual performance. To find the optimal sorting method to define the higher-performing and lower-performing individual, the standard error of mean (SEM), produced by each sorting method when determining the leader in a collaborative task, was compared between the sorting methods. Here, the lower SEM that a sorting method produces, the more certain the sorting method is to use for defining the higher- and lower-performing individual as it shows that the results were more consistent throughout all dyads. Determining the leader-follower dynamicsThe leader of the collaborating task was determined by measuring and analysing the forces applied to the robot by each partner. Force measurements were used as the base for determining the leader due to the fact that the robot movement is determined solely by the force applied to its end-effector. This means that the subject applying a higher force to the end-effector has a higher influence on the robot movement.