View source: R/fast_roc_calculation.R

fast_roc_calculation | R Documentation |

This function is used to create time-dependent ROC curve from censored survival data using the Kaplan-Meier (KM) or Nearest Neighbor Estimation (NNE) method of Heagerty, Lumley and Pepe, 2000

fast_roc_calculation(test_matrix, y_surv, predict_time = 5, roc_method = "NNE")

`test_matrix` |
Test matrix used in the analysis. Colmuns are samples, rows are markers. |

`y_surv` |
Survival information created by Surv function in survival package. |

`predict_time` |
Time point of the ROC curve, default is 5 year. |

`roc_method` |
Method for fitting joint distribution of (marker,t), either of KM or NNE, the default method is NNE. |

This will retrun a numeric vector contains AUC results for each row in test_matrix.

Xin Yu

data(demo_survival_data) data('demo_data',package = "EnMCB") demo_set<-demo_data$realdata res<-fast_roc_calculation(demo_set[1:2,],demo_survival_data)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.