runlength {success} | R Documentation |
Determine run length of a CUSUM chart
Description
This function can be used to calculate the run length of a 'cgrcusum', 'bkcusum' or 'bercusum' chart when using control limit h
Usage
runlength(chart, h)
## S3 method for class 'cgrcusum'
runlength(chart, h, ...)
## S3 method for class 'bkcusum'
runlength(chart, h, ...)
## S3 method for class 'bercusum'
runlength(chart, h, ...)
Arguments
chart |
A |
h |
Control limit h to be used when determining the run length |
... |
Other parameters |
Value
The run length of the chart with the given control limit.
Methods (by class)
-
runlength(cgrcusum)
: determines runlength ofcgrcusum
object -
runlength(bkcusum)
: determines runlength ofbkcusum
object -
runlength(bercusum)
: determines runlength ofbercusum
object
Author(s)
Daniel Gomon
Examples
exprfitber <- as.formula("(survtime <= 100) & (censorid == 1) ~ age + sex + BMI")
glmmodber <- glm(exprfitber, data = surgerydat, family = binomial(link = "logit"))
bercus <- bernoulli_cusum(data = subset(surgerydat, unit == 14), glmmod = glmmodber,
followup = 100, theta = log(2))
#Determine the run length of the above Bernoulli CUSUM when using a control limit
#of h = 1.
runlength(bercus, h = 1)
[Package success version 1.1.0 Index]