R/KMW.R

Defines functions KMW

KMW <-
function(time, status) {
    t1 <- max(time)
    len <- length(time)
    res <- .C("WeightsKaplanMeierSort", time = as.double(time), status = as.integer(status), as.integer(len), as.double(t1), 
              weights = double(len), PACKAGE = "TP.idm")
    return(res$weights)
  }

Try the TP.idm package in your browser

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

TP.idm documentation built on Aug. 17, 2023, 9:07 a.m.