- data
A data.frame
with rows representing subjects and the
following named columns:
entrytime
:
time of entry into study (numeric);
survtime
:
time from entry until event (numeric);
censorid
:
censoring indicator (0 = right censored, 1 = observed),
(integer).
and optionally additional covariates used for risk-adjustment.
coxphmod
A Cox proportional hazards regression model as
produced by
the function coxph()
. Suggested:
coxph(Surv(survtime, censorid) ~ covariates, data = data)
.
Alternatively, a list with the following elements:
formula
:
a formula()
in the form ~ covariates
;
coefficients
:
a named vector specifying risk adjustment coefficients
for covariates. Names must be the same as in formula
and colnames of data
.
cbaseh
A function that returns the unadjusted cumulative
baseline hazard \(H_0(t)\). If cbaseh
is missing but
coxphmod
has been
specified as a survival object, this baseline hazard rate will be determined
using the provided coxphmod
.
ctimes
(optional): Vector of construction times at which the value of the chart should be
determined. When not specified, the chart is constructed at all failure times.
h
(optional): Value of the control limit. The chart will only be
constructed until the value of the control limit has been reached or
surpassed.
stoptime
(optional): Time after which the value of the chart should no
longer be determined. Default = max(failure time). Useful when ctimes
has not been specified.
C
(optional): A numeric value indicating how long after entering the study
patients should no longer influence the value of the chart. This is
equivalent to right-censoring every observation at time entrytime
+ C.
pb
(optional): A boolean indicating whether a progress bar should
be shown. Default is FALSE
.
ncores
number of cores to use to parallelize the computation of the
CGR-CUSUM chart. If ncores = 1 (default), no parallelization is done. You
can use detectCores()
to check how many
cores are available on your computer.
cmethod
Method to calculate chart values. One of the following:
"memory"
(default): matrix formulation of the problem
(faster for high volume/long time construction)
"CPU"
calculates the value of the CGR-CUSUM for every
time point from scratch. Recommended for small data volume
(lower initialization time).
dependencies
(optional): When ncores > 1
, specify a list of
variables/functions/other dependencies to be exported to the core clusters
for parallel computation.
detection
Should an "upper"
or "lower"
CGR-CUSUM be
constructed. Upper CUSUMs can be used to monitor for an increase in the
failure rate, while lower CUSUMs can be used to monitor for a decrease in the
failure rate.
assist
(optional): Output of the function parameter_assist()
maxtheta
(optional): Maximum value the maximum likelihood estimate for
parameter \(\theta\) can take. If detection = "lower"
, -abs(theta)
will be the minimum value the maximum likelihood estimate for
parameter \(\theta\) can take. Default is log(6)
, meaning that
at most a 6 times increase/decrease in the odds/hazard ratio is expected.