XmR charts for several measures at the same day/month

Xmr charts are often used in statistical process control (see for example). They make sense, but I wonder what one does, if one has several measure per day/month etc. Should one just use the average (e.g. arithmetic mean)?

This code taken from here simulates 12 measurements, one for each month:

library(ggplot2)
library(ggQC)

set.seed(5555)
Golden_Egg_df <- data.frame(month=1:12,
egg_diameter = rnorm(n = 12, mean = 1.5, sd = 0.2)
)
Golden_Egg_df\$egg_diameter[3] <- 2.5

options(repr.plot.width = 5, repr.plot.height = 5)
XmR_Plot <- ggplot(Golden_Egg_df, aes(x = month, y = egg_diameter)) +
geom_point() + geom_line() +
stat_QC(method = "XmR")

XmR_Plot


• As I read your question, you may consider removing the "change-point" and "structural-change" tags and add the control-chart tag. Or is there truly a change point to a new function? Dec 26 '20 at 22:11
• I posted an answer assuming that all data points are sampled from a univariate time series. If it is multivariate (the data points are generated from different processes) please update the question accordingly. Dec 26 '20 at 22:20
• @JonasLindeløv thanks. I added an answer. I think I need to edit the question as my time series may be multivariate. I have several people doing the same job (THE? process). Every other date a person completes a job and creates a KPI. That's why I can have several values per day. Dec 27 '20 at 6:19
• I updated my answer so that it hopefully addresses these questions. Dec 28 '20 at 20:57

1 Answer

Classical statistical process control (SPC) operates only operates on a single sequence of data points (ranked time) without taking into account their temporal distance. That is, it does not matter whether the data points are seconds or years apart.

In many cases, this is an impermissible simplifaction of much richer data. If you have content knowledge classical SPC represents your phenomenon poorly, you could tweak it so that it does become representative. E.g.:

• Reduce to mean: If you think that densely spaced data points really are sampled from the same underlying single value rather (i.e., the mean is more of interest than the individual data points), data reduction using a mean is justified.

• Multivariate: If you think that individual workers will drift collectively but from each his/her own intercept and/or spread, a multivariate solution seems appropriate.

• Split data: If you think that individual workers will drift independently of each other, you probably want to do statistical process control on each one individually.

• Thanks. Makes sense. So I could just sort my data by date and then rank by date (i.e. assign running number)? In my particular case several people (processes?) do a job (THE ? process). They create a KPI of there completed work at a certain date. So maybe I need to update my question as we deal with multivariate time series? Thanks. Dec 27 '20 at 6:16
• I also came across this: cran.r-project.org/web/packages/qicharts/vignettes/… the xbar and s charts look appropriate. Thanks. Jan 6 '21 at 13:09