knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

surverify

Travis build status Codecov test coverage

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).

Installation

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


Alanocallaghan/surverify documentation built on June 24, 2021, 11:01 a.m.