Description Usage Arguments Details Value Methods (by class) References Examples
Test on device-events using the tabular CUSUM (CUmulative SUM) method.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
df |
Required input data frame of class
|
... |
Further arguments passed onto |
ts_event |
Required if Default: Example: |
analysis_of |
Optional string indicating the English description of what
was analyzed. If specified, this will override the name of the
Default: Example: |
eval_period |
Optional positive integer indicating the number of unique times counting in reverse chronological order to assess. This will be used to establish the process mean and moving range. Default: |
delta |
Required number of sigmas at which to detect a mean shift. Default: |
H |
Optional positive number representing the decision interval bound. Lower values will result in a more sensitive test. Default: |
zero_rate |
Required maximum proportion of Default: |
mu |
Optional value of the in-control process mean, typically measured from historical data. Default: |
sigma |
Optional value of the in-control process standard deviation, typically measured from historical data. Default: |
Function cusum()
is an implementation of the tabular CUSUM
method originally proposed by E.S. Page. CUSUM is part of the family of
statistical process control tests.
A named list of class mdsstat_test
object, as follows:
Name of the test run
English description of what was analyzed
Named boolean of whether the test was run. The name contains the run status.
A standardized list of test run results: statistic
for the test statistic, lcl
and ucl
for the 95
confidence bounds, p
for the p-value, signal
status, and
signal_threshold
.
The test parameters
The data on which the test was run
mds_ts
: CUSUM on mds_ts data
default
: CUSUM on general data
Page, E. S. (June 1954). "Continuous Inspection Scheme". Biometrika. 41 (1/2): 100–115. doi:10.1093/biomet/41.1-2.100. JSTOR 2333009.
1 2 3 4 5 6 7 8 9 | # Basic Example
data <- data.frame(time=c(1:25), event=as.integer(stats::rnorm(25, 100, 25)))
a1 <- cusum(data)
# Example using an mds_ts object
a2 <- cusum(mds_ts[[3]])
# Example using a derived rate as the "event"
data <- mds_ts[[3]]
data$rate <- ifelse(is.na(data$nA), 0, data$nA) / data$exposure
a3 <- cusum(data, c(Rate="rate"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.