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

Fully delegate package installation to rstantools #55

Closed andrjohns closed 1 year ago

andrjohns commented 1 year ago

This PR updates your package to fully delegate the installation/compilation of stan models to rstantools

giabaio commented 1 year ago

Thanks, @andrjohns. My fault, because I should have done this long ago, but main is not the, well..., main repo, right now... It's the CRAN version, but I've since split the whole package into three branches (dev, hmc and inla), so that installation for the "average" user wouldn't necessarily be so computationally intensive...

dev (which I need to port onto main) contains the main utility functions and the frequentist fitting of the models. hmc is a standalone package (technically, survHEhmc), which has the Bayesian modelling through Stan (which is where your changes should go, I guess...) and inla (=survHEinla) have the functions to the model fitting through INLA.

The user loads up the "basic" version and then if you want to run Bayesian models, fit.models(..., method="hmc") would automatically load (and install if not yet available) the hmc module. See here for more details.

I guess your changes would apply more or less verbatim to the hmc branch --- but if so, would you mind resending the PR to that branch? (Then I really should find the time to clean up the repo and port main onto cran; and dev onto main to avoid confusion...).

Thanks

andrjohns commented 1 year ago

No worries! I'll close this and port the changes over