knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of surverify is to implement concordance statistics in R using modern package development tools (one might even say "in a tidy way", though I would elect not to).
Install from github with
install_github("Alanocallaghan/surverify")
Here's a demo showing I calculate Uno's C correctly.
load_all() library("survival") library("survAUC") TR <- ovarian[1:16,] TE <- ovarian[17:26,] train.fit <- coxph( Surv(futime, fustat) ~ age, x = TRUE, y = TRUE, method = "breslow", data = TR ) lpnew <- predict(train.fit, newdata = TE) Surv.rsp <- Surv(TR$futime, TR$fustat) Surv.rsp.new <- Surv(TE$futime, TE$fustat) Cstat <- UnoC(Surv.rsp, Surv.rsp.new, lpnew) cme <- uno_c(Surv.rsp, Surv.rsp.new, lpnew) Cstat cme
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.