Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create the simplest test data set
- test1 <- list(time=c(4,3,1,1,2,2,3),
- status=c(1,1,1,0,1,1,0),
- x=c(0,2,1,1,1,0,0),
- sex=c(0,0,0,0,1,1,1))
- # Fit a stratified model
- m=coxph(Surv(time, status) ~ x + sex, test1)
- y=predict(m,type="survival",by="sex")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement