Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Zad 2
- View(cancer)
- object <- with(na.omit(cancer), Surv(time, status))
- model <- survfit(object ~ sex, data = na.omit(cancer))
- print(model, rmean="common")
- dif <- survdiff(object ~sex, data = na.omit(cancer))
- print(dif, rmean="common")
- ggsurvplot(model,
- data = na.omit(cancer),
- risk.table = TRUE,
- pval = TRUE,
- conf.int = TRUE,
- fun = 'pct',
- legend.labs = c('Male', 'Female'),
- legend.title = 'Sex')
- model4 <- coxph(object ~ sex + age + meal.cal, data = na.omit(cancer))
- summary(model4)
- step(model4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement