giabaio / survHE

Survival analysis in health economic evaluation Contains a suite of functions to systematise the workflow involving survival analysis in health economic evaluation. survHE can fit a large range of survival models using both a frequentist approach (by calling the R package flexsurv) and a Bayesian perspective.
https://gianluca.statistica.it/software/survhe/
41 stars 19 forks source link

Compatibility with next rstan #39

Closed andrjohns closed 3 years ago

andrjohns commented 3 years ago

Hi,

This PR adds the changes to build flags that are needed for compatibility with the upcoming release of rstan. These changes include adding compiler & linker flags needed for working with StanHeaders >= 2.26, namely the addition of the TBB (RcppParallel).

Additionally, this PR adds a compiler flag to your Makevars files which is needed for compatibility with the upcoming version of rstan: -DUSE_STANC3

The Stan-to-c++ transpiler (stanc) was refactored after 2.21, and so different c++ is used in the new rstan package (>= 2.26). Because of this, the flag -DUSE_STANC3 needs to be added when a stan model is being run using the new rstan package (and the new stanc implementation).

I also had to make some minor changes to your models, as the new compiler throws an error when you declare a variable with the same name as the function that you're defining.

Feel free to let me know if you need any more info.

Thanks! Andrew

giabaio commented 3 years ago

Thanks, @andrjohns. Some of the changes you suggest are already implemented in the devel branch (in fact, can I please ask you to work on that one? The main is the same as the current version on CRAN, but I'm avoiding messing with it... I'm including (though without formally merging) your suggestions in the devel branch and as soon as it updates it should be in line with yours.

I'm including you as a contributor, if you are happy with that --- and happy for you to make changes/suggestions on the code!

andrjohns commented 3 years ago

Oh great, sorry about the mix-up! I'll fix up the conflicts with the devel branch