# load libraries for models and data
library(survival)
# fit model
s <- survdiff(
Surv(time, status) ~ pat.karno + strata(inst),
data = lung
)
# summarize model fit with tidiers
tidy(s)
glance(s)
Run the code above in your browser using DataLab