Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix inherits - broken due to breaking change in splines2 0.5
splines2 v0.5.0 made a breaking change, and the class was renamed from iSpline to ISpline, and the order of the class heirarchy was also changed. Same for their mSpline class, etc.
- Loading branch information
67478d4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Sam,
I have a couple of models done with this feature/survival version 2.21.3. I updated because moved to other new laptop and I am having an issue when I call posterior_survfit()
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 't': no applicable method for 'predict' applied to an object of class "c('matrix', 'mSpline', 'splines2')"
I wonder if it is related to the new version of splines2 or this new version. Is there any workaround for this?
Thanks
67478d4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm yeah, the other day I was trying to get the feature/survival branch more up-do-date with rstanarm master, and one of the things I hit was that splines2 had changed their classes, from for e.g. from something like
c("matrix", "mSpline")
toc("MSpline", "splines2", "matrix")
, or something like that. It sounds like you are hitting something related to that. Are you using the currentposterior_survfit
on an older model object? i.e. one you fit with an earlier version of thefeature/survival
branch? If so, some suggestions that might or might not work:I feel like 3. might make the most sense and be the easiest, if it works.
67478d4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see them mention adjusting the class order in major changes for v0.5 here: https://cran.r-project.org/web/packages/splines2/news/news.html
So I guess the predict with new splines2 might not work with the basis object from an older version of splines2.
67478d4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brainmelt, I just realised you are commenting on this exact commit, and not just a repo Issue. 😂