runlength {cgrcusum}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 'cgrcusum', 'bkcusum' or 'bercusum' chart

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)

Author(s)

Daniel Gomon

See Also

Other utils: calc_risk(), exp_hazards, gen_arriv_times(), gen_surv_times()

Other utils: calc_risk(), exp_hazards, gen_arriv_times(), gen_surv_times()

Other utils: calc_risk(), exp_hazards, gen_arriv_times(), gen_surv_times()

Examples

varsanalysis <- c("age", "sex", "BMI")
exprfitber <- as.formula(paste("(entrytime <= 365) & (censorid == 1)~",
                               paste(varsanalysis, collapse='+')))
surgerydat$instance <- surgerydat$Hosp_num
glmmodber <- glm(exprfitber, data = surgerydat, family = binomial(link = "logit"))
bercus <- bercusum(data = subset(surgerydat, Hosp_num == 14), glmmod = glmmodber,
                   followup = 100, theta = log(2))
runlength(bercus, h = 2)

[Package cgrcusum version 0.1.0 Index]