Regarding Stan_surv function

Hi all,

     I wanted to fit some models using Bayesian survival analysis. However, I couldn't find the function "stan_surv" in rstanarm functions. The only option I see is stan_jm, but my model requires survival function with cox regression family or any parametric families. Anyone has any idea when the stan_surv function will be available? 

Thanks.

If you wish to use the stan_surv function you have to install rstanarm from the Stan R package repository. This has not made its way to CRAN yet.

install.packages("rstanarm", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
2 Likes

Hi,

 Thanks for the reply. I have a silly question. If it is not available in CRAN, can I cite the package in my paper if I use this function? 

Thanks.

Hm, not sure on how to cite in that case. I guess citing rstanarm is appropriate but maybe there is something to cite for the survival stuff as well.
Tagging @jonah @sambrilleman who would know more.

@karthy257 Thanks for asking! :-)

Probably make most sense to cite our arXiv paper:

Brilleman, S. L., Elci, E. M., Novik, J. B., & Wolfe, R. (2020). Bayesian Survival Analysis Using the rstanarm R Package. arXiv preprint arXiv:2002.09633, https://arxiv.org/abs/2002.09633.

as well as the usual rstanarm citation:

Goodrich B, Gabry J, Ali I, Brilleman S (2020). “rstanarm: Bayesian applied regression modeling via Stan.” R package version 2.21.1, https://mc-stan.org/rstanarm.

1 Like

Thank you so much. Actually, I have read your paper. I will cite it.

Hi, I have used this link to download the package, but I still cannot get R to recognized the stan_surv function. Is there an additional step required?

Before installing , I removed rstanarm. After installing the link, I restarted rstudio. It worked.

1 Like

It is working now - thank you!

1 Like