calculate_signal_times function

Calculate Signal Times

Calculate Signal Times

The function calculate_signal_times calculates the time to signals given a control chart matrix and a specified control limit (CL).

calculate_signal_times( chart_matrix, time_matrix, nobs, starttime, endtime, design_interval, n_time_units, time_unit, CL )

Arguments

  • chart_matrix: a matrix of charting statistic values.

    chart_matrix[i,j] is the jth charting statistic of the ith subject.

  • time_matrix: a matrix of observation times.

    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.

    The design interval will be discretized to

    seq(design_interval[1],design_interval[2],length.out=n_time_units)

  • time_unit: an optional numeric value of basic time unit. Only used when n_time_units is missing.

    The design interval will be discretized to

    seq(design_interval[1],design_interval[2],by=time_unit)

  • CL: a numeric value specifying the control limit.

    CL is the control limit, signals will be given if charting statistics are greater than the control limit.

Returns

A list of two vectors:

  • $signal_times: times to signals, a numeric vector.

  • $signals: whether the subject received signals, a logical vector.

Details

Calculate Signal Times

Examples

data("data_example_long_1d") result_pattern<-estimate_pattern_long_1d( data_matrix=data_example_long_1d$data_matrix_IC, time_matrix=data_example_long_1d$time_matrix_IC, nobs=data_example_long_1d$nobs_IC, design_interval=data_example_long_1d$design_interval, n_time_units=data_example_long_1d$n_time_units, estimation_method="meanvar", smoothing_method="local linear", bw_mean=0.1, bw_var=0.1) result_monitoring<-monitor_long_1d( data_matrix_new=data_example_long_1d$data_matrix_OC, time_matrix_new=data_example_long_1d$time_matrix_OC, nobs_new=data_example_long_1d$nobs_OC, pattern=result_pattern, side="upward", chart="CUSUM", method="standard", parameter=0.5) result_signal_times<-calculate_signal_times( chart_matrix=result_monitoring$chart, time_matrix=data_example_long_1d$time_matrix_OC, nobs=data_example_long_1d$nobs_OC, starttime=rep(0,nrow(data_example_long_1d$time_matrix_OC)), endtime=rep(1,nrow(data_example_long_1d$time_matrix_OC)), design_interval=data_example_long_1d$design_interval, n_time_units=data_example_long_1d$n_time_units, CL=2.0)

References

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).

  • Maintainer: Lu You
  • License: GPL-2 | GPL-3
  • Last published: 2022-07-16

Useful links