https://github.com/cran/emplik
Raw File
Tip revision: a09ab78cfdae5c86da702f74c604cda1abde8ddf authored by Mai Zhou on 08 August 1977, 00:00:00 UTC
version 0.5-1
Tip revision: a09ab78
DnR.R
DnR <- function(x, d, w)
{
# inputs should be from  Wdataclean2()

allrisk <- rev(cumsum(rev(w)))
posi <- d == 1
uncenx <- x[posi]
uncenw <- w[posi]
uncenR <- allrisk[posi]

list( time = uncenx, n.risk = uncenR, n.event = uncenw )
}

back to top