cgr_helper {cgrcusum}R Documentation

Continuous time Generalized Rapid response CUSUM (CGR-CUSUM) helper - single time point

Description

This function calculates the value of the CGR-CUSUM at one specified timepoint

Usage

cgr_helper(data, ctime, coxphmod, cbaseh, displaypb = FALSE)

Arguments

data

data frame containing the following named columns: entrytime (numeric - time of entry into study), survtime (numeric - time from entry until event), censorid (integer - censoring indicator: 0 - right censored, 1 - observed), cause (factor - cause of event - competing risks).

ctime

construction time (single) at which the value of the chart should be determined.

coxphmod

a cox proportional hazards regression model as produced by the function coxph. Obtained using: coxph(Surv(survtime, censorid) ~ covariates, data = data). Alternatively, a list with $formula (~ covariates) and $coefficients (named vector specifying risk adjustment coefficients for covariates - names must be the same as in $formula and colnames).

cbaseh

a function which returns the non risk-adjusted 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.

displaypb

(optional) boolean indicating whether a progress bar should be displayed

Value

A list containing the following:

Author(s)

Daniel Gomon

See Also

bkcusum, bercusum (step 2)

Examples

#TO-DO

[Package cgrcusum version 0.1.0 Index]