HorridTom / autospc

GNU General Public License v3.0
3 stars 0 forks source link

Implement mR screening in XmR chart #114

Closed HorridTom closed 1 week ago

HorridTom commented 3 months ago

This is actually implemented here: https://github.com/HorridTom/autospc/blob/454c502b5b89acc9b8d953f65de066133a81723d/R/spc_functions.R#L251-L269 providing two options: 1) recursive_mr_screen = FALSE; in this case moving ranges above the upper range limit are removed and the limits recalculated, and 2) recursive_mr_screen = TRUE; in this case moving ranges above the upper range limit are removed, the upper range limit is recalculated, and this process is repeated until there are no moving ranges above the upper range limit.

This is ok, but the following would be useful to add: 1) the option to use no mR screening at all (not recommended, but some users may want to use this to more directly compare with existing charts they have created that do not use screening) - this may necessitate moving to a three-valued argument mr_screen = c("once", "recursive", "never"). 2) some means to ensure that the recursive strategy doesn't keep going too long - what if we remove all but one mR? 3) this may be overkill, but could add option for user to specify max_loops, then maybe need a different argument, perhaps a numeric mr_screen_max_loops that specified the maximum number of loops, with: a) mr_screen_max_loops = 0 indicating no mR screening (mr_screen = "never" above), b) mr_screen_max_loops = 1 indicating simple screening (i.e. same as mr_screen = "once" above), c) Other natural number values specifying maximum number of loops e.g. mr_screen_max_loops = 2, and d) mr_screen_max_loops = Inf indicating recursive screening (mr_screen = "recursive").