powered by
petsum(data, response, group = 1, times = c(12, 14), units = "months")
require(survival) lung$sex<-factor(lung$sex) petsum(lung,c("time","status"),"sex") petsum(lung,c("time","status")) petsum(lung,c("time","status"),"sex",c(1,2,3),"months")
Run the code above in your browser using DataLab