R/has_switch.R

Defines functions .has_switch

#' Whether a group model can switch after progression
#'
#' @param model An \code{ms_model} object.
#' @return \code{TRUE} if the model has progression and a positive
#'   probability of switching at progression or a positive switch hazard after
#'   progression.
#' @noRd
.has_switch <- function(model) {
  any(model$prog > 0) && (any(model$switch_prob > 0) || any(model$switch_rate > 0))
}

Try the DesignComplexSurvival package in your browser

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

DesignComplexSurvival documentation built on Nov. 23, 2026, 5:07 p.m.