R/netsurv_exhaz_ptcure.R

Defines functions netsurv_exhaz_ptcure

netsurv_exhaz_ptcure <- function(z_pcured, time = time, theta) {
  netsurv <- exp(-cumLexc_alphaweibull_topred(z_pcured,
                                            x = time,
                                            theta)$cumhaz)
  ex_haz <- lexc_alphaweibull(z_pcured,
                            x = time,
                            theta)

  pt_cure <- cumLexc_alphaweibull_topred(z_pcured,
                                       x = time,
                                       theta)$cured / netsurv

  res = c(netsurv, ex_haz, pt_cure)

return(res)
}

Try the curesurv package in your browser

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

curesurv documentation built on April 12, 2025, 2:21 a.m.