R/get.risk.coxph.R

Defines functions get.risk.coxph

Documented in get.risk.coxph

get.risk.coxph <-
function(mdl, t0) {
  bash    = basehaz(mdl)
  lambda0 = approx(bash$time, bash$hazard, t0)$y
  risk    = 1 - exp( - lambda0 * exp( mdl$linear.predictors ) )

  return(risk)
}

Try the nricens package in your browser

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

nricens documentation built on May 2, 2019, 6:01 a.m.