# Effect of Stimulus Regularities on Eye Movement Characteristics
## 2 Materials and Methods
### Data Analyses and Measures  
Eye tracking software (JazzManager 3.13 created by Ober Consulting Sp. z o.o., Poznan, Poland in cooperation with Nalecz Institute of Biocybernetics and Biomedical Engineering,Polish Academy of Sciences, Warsaw, Poland) was used to divide the eye movements into saccades and fixations using a threshold velocity of 30 deg/s and an acceleration threshold of 8000 deg/s\({}^{2}\). The potential calibration errors and eye drifts were corrected using the Iterative Closest Point algorithm [28]. We used the saccade number, the saccade amplitude, fixation duration, and gaze number to characterize the potential change in gaze behavior in the epochs. These characteristics were evaluated only during the stimulus presentation; thus, we excluded the memory-guided eye movements from the analyses. The gaze number was estimated using the DBSCAN clustering algorithm [29] to aggregate the fixations into regions of interest. The clusters of fixation positions were required to have at least 200 data points (corresponding to a fixation duration of at least 200 msec for sequential eye records). All statistical analyses were performed in an R environment [30]. We used generalized mixed models to evaluate the effect of stimulus similarity and the potential learning effects on the kinematics of eye movements. The models were fitted with the brms package [31]. This method is more robust for complex data structures and small sample sizes than frequentist methods. We needed to apply generalized mixed models to take into account the specifics of the data, the individual differences between the participants, and the non-normal distributions of the eye movement characteristics. Too often, the frequentist methods do not converge when applied to these types of models. For all tested characteristics, we treated the pattern combinations not as random factors but as categorical variables, as the stimulus combinations were formed following specific rules. This choice allows us to evaluate the effect of pattern similarity on eye movement characteristics. In the modeling, we started with the complete set of 72 unique pattern pairs, i.e., assuming that the pattern position and orientation would change the gaze behavior. We also tested simpler models in which the pattern orientation or position was disregarded. Models, disregarding only the rotation angle of the patterns on the right, included 24 unique stimulus pairs, whereas when the relative position of the patterns in a pair was also disregarded, the unique stimuli were 15. We used cross-validation for model comparison. This approach depends less on the prior distribution than the model comparison based on the Bayesian factor (BF). The fixation duration has a skewed distribution of positive values. We used a shifted lognormal distribution for the likelihood. Based on the earlier research data and the high variability in fixation duration, we used a normal distribution with a mean of 5 and a standard deviation of 0.8 as prior distribution for the pattern combinations. This choice implies that the expected saccade duration is about 245 msec and varies with the stimuli and the blocks in the 0 to 8000 msec range. The sigma was assumed to have a normal distribution with a zero mean and a standard deviation of 1.5. The standard deviation of the model parameters was modeled with normal distribution with a zero mean and a standard deviation of 0.5. We used the default values to model the shift in the distribution. The data for the saccade amplitude have only positive values and could be considered as continuous variables. The exploratory analysis of the amplitudes showed that they had bimodal distributions. We modeled their likelihood function with a hurdle lognormal distribution. We used a normal distribution with a mean of 10 and a standard deviation of 3 for the prior distribution for the effect of the combinations and the epochs.