R/cal_os.R

Defines functions .cal_os

#' OS of one group given the follow-up time from which switching is possible
#'
#' \code{.os_avail()} for a group that can switch, and \code{.ep_eval()} (no
#' dependence on \code{o}) for a group that cannot.
#'
#' @param model An \code{ms_model} object.
#' @param s,o Numeric vectors of equal length.
#' @return A list with \code{surv} and \code{dens}.
#' @noRd
.cal_os <- function(model, s, o) {
  if (.has_switch(model)) {
    return(.os_avail(model, s, o))
  }
  ep <- .ep_eval(model, s, "os")
  list(surv = ep$surv, dens = ep$dens)
}

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.