The function calculate_ATS calculates the average time to signals (ATS) given a control chart matrix and a specified control limit (CL). ATS is defined as the average time from the start of process monitoring to signal times.
chart_matrix: charting statistic values arranged as a numeric matrix.
chart_matrix[i,j] is the jth charting statistic of the ith subject.
time_matrix: observation times arranged as a numeric matrix.
time_matrix[i,j] is the jth observation time of the ith subject, corresponding to the time the charting statistic chart_matrix[i,j] is computed.
nobs: number of observations arranged as an integer vector.
nobs[i] is the number of observations for the ith subject.
starttime: a numeric vector that gives the start times.
starttime[i] is the time that the ith subject starts to be monitored.
endtime: a numeric vector that gives the end times.
endtime[i] is the time that the ith subject is lost to be monitored.
design_interval: a numeric vector of length two that gives the left- and right- limits of the design interval. By default, design_interval=range(time_matrix,na.rm=TRUE).
n_time_units: an integer value that gives the number of basic time units in the design time interval.
CL is the control limit, signals will be given if charting statistics are greater than the control limit.
no_signal_action: a character specifying the method to use when a signal is not given to a process. If no_signal_action="omit" take averages by omitting the processes with no signals, namely, average only the processes with signals.
If no_signal_action="maxtime" impute the signal times by the maximum time, which is the right limit of design time interval.
If no_signal_action="endtime" impute the signal times by the end times.
Returns
a numeric value, the ATS given the charting statistics and the control limit.
Qiu, P. and Xiang, D. (2014). Univariate dynamic screening system: an approach for identifying individuals with irregular longitudinal behavior. Technometrics, 56:248-260.
Qiu, P., Xia, Z., and You, L. (2020). Process monitoring roc curve for evaluating dynamic screening methods. Technometrics, 62(2).