Capstone: The Cox model
To conclude the course, let's take a look back at the lung cancer dataset we utilized briefly in these last 2 chapters. To recap, this dataset contains information on the survival of patients with advanced lung cancer from the North Central Cancer Treatment Group. The event is stored in the status
variable, which has a value of 2
if an individual did not survive. The performance score (variable performance
) measures how well a patient can perform usual daily activities (bad=0, good=100), rated by a physician. We want to know the association between specific performance scores and survival time.
Este ejercicio forma parte del curso
Survival Analysis in R
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Compute Cox model and survival curves
cxmod <- ___(___(___, ___) ~ ___, data = lung)
new_lung <- data.frame(performance = ___)
cxsf <- ___(cxmod, data = ___, newdata = ___, conf.type = "none")