-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Feature/survival #323
base: master
Are you sure you want to change the base?
Feature/survival #323
Conversation
For stansurv objects, this allows plotfun to be a plot of the baseline hazard vs time (the default), or time-dependent hazard ratio(s) vs time, or otherwise plot.stanreg is called.
…e code up until now?? :explodinghead:
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.
Copy behaviour from this commit 3c08d53
Bring feature/survival up to date with master
splines2 became stricter and raises an error for internal knots on the boundary. So instead of making the internal knot 5 (max event time), let's make it 4 in these tests. Also a vector for qnodes makes no sense. So I'll remove this redundant test.
Same as #594. But must have missed the use of it in log_lik.R
Dear all, install.packages("rstanarm", repos = c("https://mc-stan.org/r-packages/", getOption("repos"))) I am using R version 4.2 on a Windows 10 computer. C:/Users/wilhch00/AppData/Local/R/win-library/4.2/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument 'Eigen::internal::packet_traits::type' {aka '__m128d'} [-Wignored-attributes] and then the error states that: Error in rstan::stanc(file, allow_undefined = TRUE, obfuscate_model_name = FALSE) : I have tried to also download the survival extension and building the package from R studio as well. |
That would be great! You could jump into the discussion in #570 to get the ball rolling if you want. Part of that discussion was about finding someone to do what you're proposing, so I'm guessing everyone would be in favor. |
Many thanks! |
That would be amazing if you had the time to do that @andrjohns! I'll post some thoughts in #570, since that seems to be where most of the discussion is happening. |
Looks like it no longer likes a function named |
I think this is pretty much ready for a pull request.
R CMD check seems to passing without any obvious issues.
I've added the splines2 package to Imports, and the simsurv package to Suggests. I've commented out some
stan_surv
testthat tests to avoid adding more packages to Suggests.There is quite a bit of overlap with
stan_jm
stuff, but I got into a mess trying to refactor all thestan_jm
code, so for now they mostly use different workhorse and helper functions. One day I will try and refactor some of thestan_jm
code to use more of thestan_surv
helpers, since thestan_surv
code is much neater I think.I've not packaged
surv.stan
code into\#include
statements since the code doesn't really overlap with other stan files. But I could do so if need be.