Skip to content

implausibel beta coefficient estimates in survex #95

@antjejahn

Description

@antjejahn

Hello, for data that follow a Cox model, I would expect the beta (regression coefficient) estimates given by the function predict_parts to be close to the true coefficients of the Cox model. The paper of Kovalev that is introducing survLIME (doi: 10.1016/j.knosys.2020.106164) confirms this by a simulation study (Figure 3). However, when applying survex to simulated data the beta estimates substantially differ from the true values. Is there any reason for that? Thanks in advance!

library(survival)
library(survex)

# simulate data
set.seed(2)
n<-1000
X1<-rnorm(n,0,1)
X2<-rnorm(n,0,1)
X3<-rnorm(n,0,1)
beta1<-0.3
beta2<--0.3
beta3<-0
time<-rexp(n,exp(beta1*X1+beta2*X2+beta3*X3))
status<-rbinom(n,1,0.9)
df<-data.frame(time,status,X1,X2,X3)

# Global Cox model 
model.cox<-coxph(Surv(time,status)~.,data=df, model = TRUE, x = TRUE)

# beta1 estimates of survLIME at 20 random observations
exp.cox <- explain(model.cox, data=df[-c(1,2)], y=Surv(df$time, df$status))

flime <- function(newobs){
  p_parts_lime <-predict_parts(explainer=exp.cox, new_observation=newobs, output_type = "survival", type="survlime")
  return(p_parts_lime$result$X1)
}

df.sample<-sample(c(1:n),20)
beta1.survLIME <- sapply(df.sample, function(x){flime(df[x,-c(1,2)])})

# Comparison of estimates and true value of beta1
beta1.est<-cbind(beta1,model.cox$coef[1],mean(beta1.survLIME))
colnames(beta1.est)<-c("true","cox_estimate","mean_survex_estimate")

beta1.est

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions