Skip to content

IBS greater than 1 issue #3

@thebasheersj

Description

@thebasheersj

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`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions