Each year the U.S. Naval Postgraduate School sets aside a “Discovery Day” during which the general public is invited into their laboratories. Our data come from 21 October 1995, when visitors could test their reaction times and hand-eye coordination in the Human Systems Integration Laboratory. The variable of interest, “anticipatory timing,” was measured by a Bassin timer, which measures a person’s ability to estimate the speed of a moving light and its arrival at a designated point.
The Timer consists of a 10 foot row of lights which is controlled by a variable speed poten-tiometer. The lights are switched on sequentially from one end to the other so that light “travels” at 5 miles per hour down the Timer. Each visitor was instructed to anticipate the “arrival” of the light at one end of the Timer and at that time to swing a plastic bat across a light beam at the same end of the Timer. An automatic timing device measured the difference between the breaking of the beam and the actual arrival of the light. A negative value of a trial variable indicated the bat broke the beam before the light actually arrived, while a positive value indicated that the bat broke the beam after the light arrived.
Each of 113 visitors completed the trial five times; there are no missing data. Age and gender were also recorded, since the researchers were interested in age and gender differences in reaction times. Visitors tended to come in family groups, but that information was not recorded.
The data is recorded in timetrial.txt. These data are sorted with one row per person and one column per each of the five trials.
Explain why we need correlated data analysis methods to analyze this dataset.
Read in this dataset and change it from wide to long format.
Suppose we are not interested in whether a participant broke the beam too early or too late; we are only interested in the magnitude of how far off the participant was in timing. Take an appropriate transformation of the outcome variable.
Describe what you see in these plots. Think about
Use a plot of residuals squared (from standard regression using the mean structure from d) vs trial to descide on any needed random effects.
Fit the linear mixed model that you think is reasonable based on your observations in part e. Interpret the fixed effects parameters in your model.
Obtain the predicted values from your model and create a profile plot of the predicted values versus trial. Comment on how the fitted model compares with the data.