Skip to content

Instantly share code, notes, and snippets.

@padpadpadpad
Created April 15, 2024 08:44
Show Gist options
  • Save padpadpadpad/12d0b5116f8a9889af88f7a15ce8629e to your computer and use it in GitHub Desktop.
Save padpadpadpad/12d0b5116f8a9889af88f7a15ce8629e to your computer and use it in GitHub Desktop.
quick code to check the installation of rstanarm (survival branch)
library(rstanarm)
library(simsurv)
?stan_surv
data("frail")
m_frail <- stan_surv(
formula = Surv(eventtime, status) ~ trt + (1 | site),
data = frail[1:40,],
basehaz = "exp",
chains = 1,
refresh = 0,
iter = 600,
seed = 123)
m_frail <- stan_surv(
formula = Surv(eventtime, status) ~ trt,
data = frail[1:40,],
basehaz = "exp",
chains = 1,
refresh = 0,
iter = 600,
seed = 123)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment