bercusum {cgrcusum}  R Documentation 
This function can be used to construct a riskadjusted Bernoulli CUSUM chart on survival data. Specify one of the following combinations for the parameters:
glmmod + theta
p0 + theta
p0 + p1
bercusum(data, followup, glmmod, theta, p0, p1, h, stoptime)
data 

followup 
The followup time for every individual. At what time after entry do we consider the outcome? 
glmmod 
Generalized linear regression model used for riskadjustment as produced by
the function

theta 

p0 
The baseline failure probability at entrytime + followup for individuals. 
p1 
The alternative hypothesis failure probability at entrytime + followup for individuals. 
h 
(optional) Control limit to be used for the procedure 
stoptime 
(optional) Time after which the value of the chart should no longer be determined 
The Bernoulli CUSUM chart is given by:
S_n = \max(0, S_{n1} + W_n)
with
W_n = X_n \ln \left( \frac{p_1 (1p_0)}{p_0(1p_1)} \right) + \ln \left( \frac{1p_1}{1p_0} \right)
where X_n is the outcome of the nth (chronological) subject in the data. Instead of displaying patient numbering on the xaxis, the time of outcome is displayed.
An object of class bercusum
containing:
CUSUM
: A data.frame
containing:
$time (times at which chart is constructed),
$value (value of the chart at corresponding times),
$numobs (number of observations at corresponding times)
call
: the call used to obtain output
glmmod
: glm coefficients used for riskadjustment, if specified
stopind
: indicator for whether the chart was stopped by the control limit
There are plot
and
runlength
methods for "bercusum" objects.
Daniel Gomon
plot.bercusum
, runlength.bercusum
Other qcchart:
bkcusum()
,
cgrcusum()
,
funnelplot()
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))
plot(bercus)