In the previous post we started to analyze a dataset from the JASP Data Library. This dataset involved an instrument that was used to measure the same part 50 times. Such data allow us to determine the performance of the measurement device. An initial look suggested that the data were not normally distributed, and the time series suggested that several measurements might have been outlying observations:

As mentioned before, observations 26, 38, 43, and 44 are definitely suspect, but numbers 19 and 41 are also in limbo. In practical application, we might be particularly interested in what circumstances caused the outliers. However, we might also try to say something about the measurement process after having removed the possible outlying observations. Here we explore this radical approach and remove the suspect observations in order to see whether this yield new insights.
Removing Outlying Observations with the Filter Tool
In JASP we can remove observations by specifying a “pass-through” filter. The figure below illustrates the process. 
First, the letter “A” in the screenshot indictes the filter icon. Pressing this icon opens the filter menu in the top part of the screen. This is where users can then specify a filter, either using R code or using a drag-and-drop interface. Here we show the drag-and-drop interface. Second, the letter “B” shows the filter specification: all observations greater than -4.3 are retained — as the letter “C” highlights, the filter is “pass-through”, meaning that it specifies the criteria for inclusion rather than exclusion. Finally, letter “D” shows that the observations that are filtered out (here, observations with values -4.6 and -4.3) are colored grey in the spreadsheet. Having filtered out the suspect observations, we can redo the earlier analyses. As an aside, in the current version of JASP it is not possible to specify an analysis-specific filter. This can be cumbersome and in the not-so-distant future we hope that JASP will have analysis-specific filters are well as general filters. At any rate, the output table in Descriptives suggest that the data still do not pass the test for normality, as the p-value of the Shapiro-Wilk test is 0.023:

Distribution Plots
The histogram for the cleaned data looks as follows:

Even after removing the outliers, the histogram does not really have the bell-shape that typifies the normal distribution. The boxplot-with-jittered observations offers the distributional information in a different form (note that the outliers are no longer present):

The QQ plot looks better than it did before removing the outliers, but still does not provide particular ensurance that the data are (approximatelky) normally distributed:

Time Series
We now plot the time series with the outlying values removed:

It is suddenly clear that the data exhibit a distinct upward trend: the observations increase over time. This could be due for instance to warm-up of the part that is being measured, or of the instrument itself. The trend implies that successive measurements are strongly correlated, something that can be quantified using the autocorrelation function:

Conclusion
An exploration of these instrument data suggests that the measurements yields outliers sprinkled on top of a more precise process that increases over time. A better understanding of the instrument requires that we identify both the cause of the outliers and the cause of the upward drift. It should be stressed that these analyses can be done with a few mouse clicks. These and other data examples analyzed on this blog will form the basis for an extensive “JASP quality control data library” that we will construct on this site. So stay tuned for more!
Authors
Eric-Jan Wagenmakers (CEO) and the JASP Services BV Team



