Last chance! 50% off unlimited learning
Sale ends in
km
computes the nonparametric maximum likelihood esimate (NPMLE) of a
survival function for right-censored data.
km(data, w = 1)
vector or matrix, or an object of class icendata
.
weights/multiplicities of observations.
A list with components:
NPMLE, an object of class idf
.
log-likelihood value of the NPMLE f
.
For details about the arguments, see icendata
.
Kaplan, E. L. and Meier, P. (1958). Nonparametric estimation from incomplete observations. Journal of the American Statistical Association, 53, 457-481.
# NOT RUN {
x = cbind(1:5, c(1,Inf,3,4,Inf))
(f = km(x)$f)
plot(f)
data(leukemia)
i = leukemia[,"group"] == "Placebo"
plot(km(leukemia[i,1:2])$f, xlim=c(0,40), col="green3") # placebo
plot(km(leukemia[!i,1:2])$f, add=TRUE) # 6-MP
# }
Run the code above in your browser using DataLab