Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- librarian::shelf("survival","tidyverse","marginaleffects")
- head(lung)
- m <- coxph(Surv(time,status) ~ age + sex,data=lung %>% mutate(sex=factor(sex)))
- summary(m)
- datagrid(sex=c(1,2),time=250,model=m)
- predictions(m,datagrid(sex=c(1,2),time=250,model=m))
- predictions(m,datagrid(sex=c(1,2),time=200,model=m))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement