-
Notifications
You must be signed in to change notification settings - Fork 21
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
Problem in predict.stan_nma_surv
.
#40
Comments
Hi @mattknowlesOHG, thanks for raising this! I have found the cause of the first issue; this is a bug introduced with the new As for the second, I haven't been able to reproduce this yet... Can you let me know which version of dplyr you are using, |
Hi @dmphillippo, thanks for the quick response! I will give your workaround a try. I am using dplyr version 1.1.4, and was running through the vignette code. For what it's worth, I'm using R v4.3.1. |
Hi @mattknowlesOHG, the first issue should be fixed with the latest update (v0.7.1) which is now on CRAN. Mac binaries are available now; windows binaries are still in the queue to be built so in the meantime I suggest installing from r-universe: install.packages("multinma", repos = c("https://dmphillippo.r-universe.dev", getOption("repos"))) As for the second issue - I can see where the error must be being produced, and this would happen if the prediction data were somehow empty for certain arms. But I can't figure out how or why this is occurring for you! I've made the predict code more robust to empty prediction data, so maybe that will fix it. |
Thanks @dmphillippo, the good news is that the plots are now generating using this version! The bad news is that I still can't quite reproduce plots in the Vignette. I get this plot when running What's interesting is if I run just |
Excellent, I'm glad that's working now! Your plot output is correct. The non-PH model with baseline hazards stratified by treatment arm as well as study cannot produce predictions for the unobserved treatments in each population. The shapes of the baseline hazards in each arm are treated as separate and unrelated. If you want a non-PH model that can produce estimates for unobserved treatment arms (i.e. can actually be used for decision-making, rather than just checking the PH assumption!) then you could fit a model that puts treatment effects (or other covariate effects) on the shape of the baseline hazard. For the M-spline model these are treatment effects on the spline coefficients. You can do this with We talk about this in a little more detail in the final paragraph of the Assessing the proportional hazards assumption section in the vignette. I think the |
Ahh this is really helpful to know, thank you so much for your help with this! |
My pleasure, thank you for reporting the bugs! |
Hi @dmphillippo, Above you say that:
Would |
Hi @dkarletsos yes, the |
Hi @dmphillippo,
When running through the newly diagnosed multiple myeloma example, I get the following
Similarly,
The text was updated successfully, but these errors were encountered: