*2.4. Measurements*

First, sociodemographic variables were recorded, including gender, age, height, weight, years at university, smoking habit, and physical activity. To quantify deviation of the perceived vertical from the theoretical vertical, the static SVV test was used through a new virtual reality system [14] during the interictal phase of headache process. The virtual reality system requires a mobile device placed into the back of a headset and a Google Cardboard-enabled application (Sistema de Realidad Virtual para Detección y Tratamiento de las Patologías Posturales y del Equilibrio, University of Jaén, Jaén, Spain, 2019) to generate a pair of stereo images (Figure 2). The test was performed in a quiet environment with dim lighting while the subject sat comfortably with their back straight and their feet uncrossed and resting on the ground. When the subject was ready, the evaluator started the test from the web application. Firstly, the virtual reality system set the line in a random position between 30◦ and 60◦ right or left. Then, the subject rotated the line using the joystick until they perceived that it was close to vertical and, then, confirmed the result with an action button. The subject had 30 second to perform each test. To calculate SVV, six measurements were made, from which the mean deviation of the perceived vertical with respect to the theoretical vertical was obtained. The mean absolute error (MAE) was calculated as the average value of the error made in each attempt, without taking the direction of deviation into account. For treatment of the dependent variable in this study, deviation of the SVV value from normal was also considered, taking as normal values those between −2.5◦ (left deviation) and 2.5◦ (right deviation) [5]. The device was validated and showed good reliability (Intraclass Correlation Coe fficient (ICC) = 0.85; 95% confidence interval (CI) = 0.75–0.92) [14]. The evaluation was always made with visual correction if the patient had it prescribed.

**Figure 2.** Participant using the mobile device to measure subjective visual vertical (SVV).

Headache-related disability as well as its frequency and intensity were assessed using the Spanish version of the migraine disability assessment (MIDAS) questionnaire [33]. This instrument is made up of seven items, the first five of which focus on three dimensions of daily life that can be a ffected by headaches while the remaining two items refer to the frequency and intensity of the headache. The sum of the scores of the first five items provides the degree of disability related to the headache, while the sixth and seventh items indicate the frequency and intensity of the headache, respectively. The Spanish version of the questionnaire has good reliability and validity properties [33].

The disability associated with neck pain was evaluated with the Spanish version of the "Neck Disability Index" (NDI) questionnaire [34], which is a self-administered questionnaire with 10 sections. Each of the sections o ffers six possible answers that represent six progressive levels of functional capacity that are scored from 0 to 5. The reliability values of this questionnaire are very high (ICC = 0.989), and it also has good internal consistency (Cronbach's α = 0.913) [34].

Sleep quality was also included as a predictor variable, due to the relationship that has been reported between the perception of verticality and the variables related to sleep [35]. To measure sleep quality, the Spanish version of the "Medical Outcomes Study Sleep Scale" (MOS-SS) was used [36], which is a self-administered questionnaire composed of 12 items, from which six subscales are

extracted. From the MOS-SS questionnaire, the variables used were sleep disturbances (ICC = 0.78; 95% CI = 0.62–0.88), daytime sleepiness (ICC = 0.57; 95% CI = 0.30–0.75), sleep adequacy (ICC = 0.75; 95% CI = 0.56–0.87), snoring (ICC = 0.84; 95% CI = 0.71–0.91), waking up briefly at night due to respiratory reasons or headache (ICC = 0.84; 95% CI = 0.71–0.91), and optimal sleep (ICC = 0.76; 95% CI = 0.58–0.87), for which the reliability values were between moderate and high [36].

## *2.5. Statistical Analysis*

Data managemen<sup>t</sup> and analysis was carried out using the SPSS statistical package, version 23.0 (SPSS Inc, Chicago, IL, USA). The level of statistical significance was established as *p* < 0.05. The data were described using means and standard deviations for continuous variables and using frequencies and percentages for categorical variables. To determine the normality of continuous variables, the Kolmogorov–Smirnov test was used, while the Levene's test of equality of variances was used to determine the homoscedasticity of the samples.

To analyze the di fferences in the perception of verticality with respect to the theoretical vertical between healthy subjects, subjects with TTHs, or those with migraines, one-way analysis of variance (ANOVA) was used, while eta-squared (η2) was used to express the e ffect size. To evaluate di fferences in the prevalence of SVV alterations (SVV more than 2.5◦ of deviation) between subjects with TTHs or migraines and healthy subjects, the chi-square test was used.

Given the binary nature of the "alteration in the perception of verticality" variable (MAE>2.5 or not), univariate logistic regression was used to identify which variables are related to it. The independent variables comprised sociodemographic variables; frequency, intensity, and disability associated with headaches; disability associated with neck pain; and variables related to sleep.

To identify the variables related to the degree of deviation of the perceived vertical from the theoretical vertical, univariate linear regression was used, given the continuous nature of the dependent variable. The independent variables for this analysis were the same as those used in the logistic regression.
