Diurnal Pattern of Reaction Time: Statistical analysis Prepared by: Alison L. Gibbs, PhD, PStat Prepared for: Dr. Principal Investigator of Reaction Time Project January 11, 2015 Summary: This report gives the results of the statistical analysis of the data collected by the 2014-15 STA490 class to investigate the diurnal pattern of reaction time. Evidence was found of a quadratic relationship, with the estimated minimum reaction time at approximately 18:30. The effects on this relationship of gender, caffeine use, time since last meal, and hours of sleep the preceding night were also investigated. No evidence was found that the diurnal pattern of reaction time differs with these variables. 1 Introduction This paper reports on the analysis of data collected by the 13 students in the 2014-15 STA490 class to investigate whether there is a diurnal pattern in reaction time. Secondary analysis considered whether the pattern differs with gender, caffeine use, time since the last meal, and hours of sleep. A brief summary of the data and changes made to them in preparation for analysis are given in Section 2. A description of the statistical methods used and the results can be found in Section 3. Some additional considerations are given in Section 4. 2 Data Summary and Manipulations The measurements considered in this report were self-reported by the 13 students in that 2014-15 STA490 class. Measurements of reaction time were taken by each student every 3 hours on one day, from 9:00 to 24:00. Students were also asked to record their gender, the day of the week on which the measurements were taken, whether or not they were caffeine users, their Circadian rhythm, and the hours of sleep they had the night before. For each reaction time, they were also asked to record whether they had used caffeine in the preceding two hours and the time since their last meal. A summary of the data collected is given in Table 1. The following manipulations were made to the data before analysis: Many students did not measure their reaction time at precisely the planned times. For the analysis, measurements were treated as if they occurred at the planned time nearest to the actual time. 1
Female Male Gender 5 (38%) 8 (62%) Yes No Caffeine user 10 (77%) 3 (23%) Yes No Caffeine use 7 (9%) 71 (91%) (For all reaction times for all students) in previous 2 hours Sunday Monday Tuesday Thursday Day of the week 4 (31%) 7 (54%) 1 (8%) 1 (8%) Definitely Moderately evening evening Neither Morning Missing Circadian rhythm 1 (13%) 1 (13%) 6 (75%) 0 5 Time Standard of day Mean deviation Minimum Maximum Missing Reaction time 9:00 0.631 0.4682 0.284 1.990 (seconds) 12:00 0.482 0.1721 0.324 0.819 15:00 0.489 0.2350 0.317 1.160 18:00 0.488 0.2166 0.322 1.020 21:00 0.474 0.2614 0.199 1.150 24:00 0.507 0.2340 0.312 1.100 Log of 9:00 0.629 0.5527 1.260 0.687 reaction time 12:00 0.782 0.3224 1.130 0.200 15:00 0.791 0.3730 1.150 0.145 18:00 0.788 0.3696 1.130 0.024 21:00 0.856 0.4663 1.610 0.141 24:00 0.757 0.3895 1.160 0.098 Time since last 4.0 4.15 0.0 20.0 7 meal (hours) Hours of sleep 7.6 0.68 7.0 9.0 preceding night < 1 hour 1 9 hours > 9 hours Categorization of 17 (24%) 46 (64%) 9 (13%) ) time since last meal 7 8 9 Categorization of 5 (39%) 5 (39%) 3 (23%) hours of sleep Table 1: Summary of all data collected. 2
Five students did not submit values for their Circadian rhythm. Given the resulting small sample size and lack of variability in the Circadian rhythms that were recorded, analysis of the effect of Circadian rhythm on the diurnal pattern of reaction time was not carried out. Analysis was not carried out on day of the week since most days had one or fewer students and the effect of day of the week is not considered of particular interest. Immediate caffeine use was considered more relevant to reaction time measurements than general caffeine use. Thus analysis was carried out on the effect of caffeine use in the two hours preceding a reaction time measurement and not on whether or not a student was a caffeine user. One student (student 7) did not record the time since his or her last meal. All data for this student were omitted from the analyses that consider time since last meal. Imputations were made for the following missing data: One student (student 7) did not record whether or not he or she consumed caffeine during the two hours preceding each reaction time measurement. This student identified him or herself as not using caffeine, so it was assumed that he or she did not use caffeine before each reaction time measurement. One student (student 13) did not record the time since last meal for the first reaction time measurement of the day. This value was imputed as the time from the last meal before midnight of the day when the reaction times were measured until 9:00, presuming the student s last meal of the day was at the same time the previous day. Times since last meal naturally grouped into three categories: close to the reaction time (where close was considered to be within one hour), between 1 and 6.5 hours, and 12 hours or more. To simplify the analysis, time since last meal was grouped into these three categories. (See Table 1.) Hours of sleep the preceding night ranged from 7 to 9 hours. To simplify the analysis, this was rounded to the nearest hour. (See Table 1.) 3 Statistical Methods and Results Linear mixed models were used to examine the nature of the relationship between reaction time and time of day. Mixed models are necessary in this context because reaction times on the same student are not independent. Including a random effect for subject in the model model induces a compound symmetry covariance structure, in which any pair of reaction times on the same student are modelled as having the same correlation. More complicated covariance structures were considered, but were found to not statistically significantly improve the fit of the model to the data (first-order auto-regressive structure) or required more parameters than it is possible to fit given the sample size (unstructured). Because reaction times have a right-skewed distribution with some large outliers and variability that increases with the mean, the analysis was carried out on the natural logarithm transformation of the reaction time. 3
Reaction time (seconds) 0.5 1.0 1.5 2.0 1.5 0.5 0.5 (a) Reaction time (b) Figure 1: Diurnal pattern of reaction time and natural log of reaction time for each student. Analysis was carried out using the lme function in the nlme package in R. Results are given in Section 3.1 for the primary analysis, which considers only the diurnal pattern of reaction time. Additional results are given in Section 3.2 for secondary analyses which consider the effects of the other variables on the diurnal pattern of reaction times. 3.1 Diurnal Pattern in Reaction Time Figure 1(b) shows the diurnal pattern of the natural logarithm of reaction time for each student. For some students, reaction time is fairly constant over the course of the day, while for others there is an evident pattern of longer reaction times at the beginning of the day (9:00) and increasing reaction times later in the day. The overall pattern of the mean of the log of reaction time is captured with a quadratic function in time of day. Higher order polynomial terms were added to the model and found to be non-significant so were removed. Table 2 gives the fitted quadratic equation and the p-values for the corresponding tests that the coefficients of the quadratic function are zero. There is evidence that both the linear term (coefficient= 0.075, p = 0.007) and the square term (coefficient= 0.002, p = 0.015) are nonzero indicating a significant quadratic relationship. There is a a time of day at which a minimum reaction time is achieved, with longer reaction times, on average, earlier and later in the day. From the fitted equation, the minimum reaction is estimated to occur at 18:30 on average. 3.2 The effects of other variables Secondary analyses were carried out to investigate if the quadratic relationship between log of reaction time and time of day differed with different values of the other variables recorded. For this analysis the effects of gender, caffeine use in the last two hours, time since last meal, and hours of sleep the night before were considered. Figure 2 shows the mean of the log of the reaction time plotted against time of day, for the different values of these variables. 4
Coefficient p-value Intercept 0.131 0.582 0.075 0.007 Square of 0.002 0.015 time of day Table 2: Fitted equation for log of reaction time as a quadratic function of time of day. p-values indicate evidence that the coefficients of both the linear and quadratic terms are non-zero. This equation estimates the fastest reaction time of the day to be at 18:30. 1.0 0.8 0.6 Gender F M 1.0 0.8 0.6 Caffeine N Y (a) Mean of log reaction time by gender (b) Mean of log reaction time by caffeine use in last 2 hours 1.0 0.8 0.6 Time since meal 1 or less 1 to 9 at least 9 0.9 0.7 0.5 Sleep 7 8 9 (c) Mean of log reaction time by hours since last meal (d) Mean of log reaction time by hours of sleep Figure 2: Diurnal pattern of log of reaction time compared between levels of the other variables. 5
Coefficient Covariate Intercept Square of time of day Gender Male -0.2139-0.0755 0.0020 Female 0.0027 There are no significant differences between males and females in the quadratic relationship between log of reaction time and time of day (p = 0.4 for intercept). Caffeine Yes -0.1615-0.0743 0.0020 in last 2 hours No -0.1368 There are no significant differences between those who did and did not use caffeine in the quadratic relationship between log of reaction time and time of day (p = 0.7 for intercept). Time since 1 hour -0.7085-0.0103 0.0001 last meal > 1 and < 9-0.8630-0.0014 9 hours 0.0704-0.0782 The coefficient of time of day is statistically significantly different between those who ate meals more than 9 hours ago and both those who ate means within the last hour (p = 0.02) and those who ate meals between 1 and 9 hours ago (p =.01). As can be seen in Figure 2(c), measurements for those who ate meals more than 9 hours ago were all taken early in the day, so the effect of last meal time on reaction time is confounded with the time of day. Hours of sleep 7 hours -0.0025-0.0755 0.0020 (rounded to 8 hours -0.2441 nearest hour) 9 hours -0.1549 There are no significant differences among hours of sleep in the quadratic relationship between log of reaction time and time of day (p = 0.6 for intercept). Table 3: Fitted equations for log of reaction time as a quadratic function of time of day for each value of the other variables. Missing coefficients indicate no significant differences among the values of the variables, and the same coefficient can be used for all values. 6
Each of gender, caffeine use in the last two hours, time since last meal, and hours of sleep the night before was considered individually. Mixed models including a random effect for subject and fixed effects for these four variables, time of day, the square of time of day, and all interactions were first fit to the data, and reduced through backwards elimination to remove non-significant interactions. Results are given in Table 3 and summarized below: Gender: Despite the apparent longer reaction times for females than males (Figure 2(a)), the relationship between log of reaction time and time of day was not statistically significantly different for females and males. Caffeine use: Although Figure 2(b) indicates longer reaction times for those who did not use caffeine, the relationship between log of reaction time and time of day was not statistically significantly different between those who had and had not used caffeine in the preceding two hours. Time since last meal: As can be seen in Figure 2(c), reaction times measured with a long gap since the last meal were all measured early in the day. Although significant differences were found between the reaction time and time of day relationship between measurements taken when there has been more than 9 hours since the last meal and measurements taken when the last meal had been more recent (see Table 3), general conclusions cannot be drawn because of the lack of long gaps between meals for reaction time measurements taken later in the day. Hours of sleep the night before: Figure 2(d) shows an apparent pattern of longer reaction times for those who slept only 7 hours. However, there are no statistically significant differences among the three values of hours of sleep the night before. 4 Conclusion and Discussion The results of the analysis of these data indicate that there is a quadratic relationship of reaction time with time of day. On average, students reaction times are slowest in the morning and quickest at 18:30. We have no evidence that gender, caffeine use, time since last meal, and hours of sleep affect this relationship. Several students did not fully comply with protocol. In particular, some students reported that the time of day when their reaction time measurements were made differed by up to 2 hours from the planned time of measurement. This may add an additional source of variation, reducing power to find the effects of other variables. Figure 2 gives some indication that there may be trends in the diurnal pattern of reaction time related to the other variables measured. In particular, females, students who have not consumed caffeine, and those with less sleep the night below have slower reaction times, and caffeine use may affect the shape of the diurnal pattern. However, none of these observed trends are statistically significant. The sample size used for this study was only 13 students. A larger sample size would give more power, possibly providing evidence of the effects of other variables such as gender, caffeine use, and hours of sleep. It would also allow models that compare the effect on diurnal pattern of more than one of these variables simultaneously, allow investigation of the potential benefit of more complex covariance structures among measurements on the same student, and mitigate the effects of missing 7
data by providing sufficient data to allow investigation of the effects of variables such as Circadian rhythm. 8