AUC.cr | R Documentation |
This function calculates the time-dependent sensitivity and specificity and area under the curve (AUC)
using precalculated weights by td.kw.cr
.
AUC.cr(X, W.prim, W.cmp, cut.off = NULL, n.grid = 1000, method)
X |
a numeric vector of risk score ranging from 0 to 1 in the same length as |
W.prim |
a numeric vector of weight for the primary event you want to study. It has the same length as |
W.cmp |
a numeric vector of weight for the competing event. It has the same length as |
cut.off |
a vector of risk score cut-off values at which sensitivity and specificity will be calculated. Default is |
n.grid |
a positive integer, the number of grid points used when calculating the ROC curve. The default is |
method |
This function read in the risk score value X
, estimated conditional probability for primary event W.prim
,
and estimated conditional probability for competing event W.cmp
to calculate sensitivity and specificity
for a series specified grid points. Based on the definition of controls mentioned in Wu and Li, 2018, we separately
calculate specificity and corresponding AUC for each definition. In addition, this function returns both the
AUC estimated by trapezoidal integration and AUC estimated by nonparametric framework mentioned in Wu and Li, 2018.
Returns a list of the following items:
a list of AUC.A.integral
estimated by trapezoidal integration for definition A,
AUC.A.empirical
estimated by nonparametric framework for definition A (Wu and Li, 2018),
AUC.B.integral
estimated by trapezoidal integration for definition B,
AUC.B.empirical
estimated by nonparametric framework for definition B (Wu and Li, 2018),
and a data frame ROC
with dimension (2+n.grid) x 4
with columns cut.off
, sens
, specA
and specB
.
survfit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.