data(sir.cont)
# Matrix of logical giving the possible transitions
tra <- matrix(ncol=3,nrow=3,TRUE)
tra[3,1:2] <- FALSE
diag(tra) <- FALSE # doesn't change much
# Computation of the Nelson-Aalen estimates
na <- mvna(sir.cont,c("0","1","2"),tra,"cens")
n.events(na,sir.cont)
Run the code above in your browser using DataLab