tests/testthat/helpers/recover_gammas.R

recover_gammas <- function(mod) {
  if (is_exponential(mod)) {
    return(NULL)
  } else if (is_weibull(mod)) {
    return(exp(mod$coefficients[["log(shape)"]]))
  } else if (is_gompertz(mod)) {
    return(mod$coefficients[["rate"]])
  } else return(NULL)
}

Try the simsurv package in your browser

Any scripts or data that you put into this service are public.

simsurv documentation built on Jan. 16, 2021, 5:27 p.m.