Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

survivalsm function fails using another dataset #6

Open
ShengnanHuang9 opened this issue Aug 2, 2019 · 6 comments
Open

survivalsm function fails using another dataset #6

ShengnanHuang9 opened this issue Aug 2, 2019 · 6 comments

Comments

@ShengnanHuang9
Copy link

ShengnanHuang9 commented Aug 2, 2019

Hi @mnwright,

Thanks for sharing this package and I've been trying to use it on my own dataset. However, when using the code like this:
survsvm.reg1 <- survivalsvm(Surv(follow_up, event) ~ AGE.bl+PTGENDER+PTEDUCAT , data = study1, type = "regression", gamma.mu = 1, opt.meth = "quadprog", kernel = "add_kernel")
An error shows up:
image
There are definitely observations in the dataset study1, and follow_up and event are all num.

Could you please let me know where goes wrong? Thanks!

@fouodo
Copy link
Collaborator

fouodo commented Aug 5, 2019 via email

@ShengnanHuang9
Copy link
Author

ShengnanHuang9 commented Aug 5, 2019

Hi Cesaire,

Thanks for your reply. I think I found the reason why. The function only accepts the covariate as a factor or continuous variable.
I used this function and get the predicted out as the predicted event time (not the censoring time). Have you ever tried to plot the predicted KM vs. the raw KM on the dataset? I try using this formula:

survsvm.reg <- survivalsvm(Surv(diagtime, status) ~ .,
                           data = veteran,
                           type = "regression", gamma.mu = 1,
                           opt.meth = "quadprog", kernel = "add_kernel")
survsvm.ptrain <- predict(object = survsvm.reg, newdata = veteran)

And then plot the predicted and the raw KM for veteran dataset as follow, you could see they are significantly different:
image

I also calculated the Brier score, only 0.04 - a really good sign for model performance, which contradicts a little with the KM curve. Is this result reasonable for your package?

Besides is the survsvm.ptrain$predicted only the observed event time or it is the observed event or censoring time, corresponding to the status indicator? Or it is just the risk level, not the predicted time at all?

Thanks in advance!

Regards,
Shengnan

@fouodo
Copy link
Collaborator

fouodo commented Aug 6, 2019 via email

@ShengnanHuang9
Copy link
Author

Hi Cesaire,

Thanks for the explanation, it really makes sense now.
C-index is really useful and the Brier score is also popular for performance measure between different models. Is there a way to calculate the Brier score for your survival SVM?
Thanks a lot!

Best regards,
Shengnan

@fouodo
Copy link
Collaborator

fouodo commented Aug 6, 2019 via email

@ShengnanHuang9
Copy link
Author

Hi Cesaire,

That is a pity... Thanks for your reply.

Best,
Shengnan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants