chart_matrix: charting statistics 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 vector of times from the start of monitoring.
starttime[i] is the time that the ith subject starts to be monitored.
endtime: a vector of times from the start of monitoring.
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.
ATS_nominal is the nominal (or say targeted) ATS that is intended to achieve.
CL_lower, CL_step, CL_upper: three numeric values.
The control limit will be searched within the interval [CL_lower,CL_upper].
When applying grid search, the algorithm will use a step size of CL_step.
(Namely, the algorithm will start with CL_lower, and search through the sequences CL_lower, CL_lower+CL_step, CL_lower+2*CL_step, ... until CL_upper.)
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.
ATS_tol: a numeric value.
Error tolerance for ATS.
CL_tol: a numeric value.
Error tolerance for control limit.
Returns
a numeric value, the control limit that gives the desired ATS.