R/rmstw_f.R

Defines functions rmstw_f

Documented in rmstw_f

#' Restricted mean survival times Weibull distribution
#'
#' @description The function `rmstw_f` computes the restricted mean survival times (RMST) according to the Weibull survival function.
#'
#'
#' @param low RMST evaluated from low to tau
#' @param tau RMST evaluated from low to tau
#' @param ascale scale parameter for the Weibull distribution
#' @param bshape shape parameter for the Weibull distribution
#'
#'
#' @export
#' @keywords internal
#' @return rmst
#'
#' @author Marta Bofill Roig
#'

#'
rmstw_f <- function(ascale,bshape,tau,low=0){
  requireNamespace("stats")
  r <- integrate(survw_f, lower = low, upper = tau, ascale, bshape)$value
  return(r)
}

Try the survmixer package in your browser

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

survmixer documentation built on March 31, 2021, 9:08 a.m.