GithubHelp home page GithubHelp logo

skyee1 / survmetrics Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 1.0 106 KB

An implementation of popular evaluation metrics that are commonly used in survival prediction including Concordance Index, Brier Score, IBS, ISE, IAE and MAE. For a detailed information, see Ishwaran H, Kogalur UB, Blackstone EH and Lauer MS (2008) <doi:10.1214/08-AOAS169> ; Moradian H, Larocque D and Bellavance F (2017) <doi:10.1007/s10985-016-9372-1> for different evaluation metrics.

R 100.00%

survmetrics's People

Contributors

skyee1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rnaimehaom

survmetrics's Issues

Mis-aligned example for IAEISE

Thanks for creating the wonderful package. I just want to point out to you that the IAEISE example in the manual is mis-displayed due to a typo in the source file. You can see where it is located with the following link.

#' #' @examples

Thanks.

IBS greater than 1 issue

I have tried SurvMetrics on many datasets in my work, but in two datasets, It gives me IBS value greater than 1 which can't be so.
The code where I get wrong IBS is below for verification purpose.

`# packages
library(survival)
library(randomForestSRC)
library(glmnet)
library(caTools)
library(tidyverse)
library(SurvMetrics)

data(peakVO2, package = "randomForestSRC")

Data splitting

set.seed(2345)
peak.sample <- sample.split(peakVO2$ttodead, 0.80)
tr.peak<- subset(peakVO2, peak.sample == T)
ts.peak<- subset(peakVO2, peak.sample == F)
dim(ts.peak)

Fit RSF model

set.seed(23456)
peak.rsf<- rfsrc(Surv(ttodead, died)~., ntree = 1000, importance = T, statistics = T, tr.peak)
peak.rsf

peak.rsf.pred<- predict(peak.rsf, ts.peak)$survival

peakful_time<- peak.rsf$time.interest
peakful_time

surv_peakful = Surv(ts.peak$ttodead, ts.peak$died)
surv_peakful

set.seed(75943038)
peakful_IBS<- IBS(surv_peakful, sp_matrix = peak.rsf.pred, peakful_time)
peakful_IBS

Result: 1.203971`

IPCW

Hi, thank you for creating such a neat package! I was hoping you could point we to the spot in the IBS function where IPCW is implemented. I don't see it :/

ps nevermind, i think i think i found it. Gt function is used inside the Brier function, which in turn is used in the IPS. Sorry for the bother!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.