Assignment_3_2
Assignment_3_2
Problem Statement
A hospital collects data on cancer patients undergoing two different treatments: Treatment A (a new
therapy) and Treatment B (a standard therapy). The goal is to analyze the survival times of patients
under both treatments and evaluate which treatment is more effective.
The data includes:
i. Survival times of patients (in months) after starting treatment.
ii. Whether the patient is censored (i.e., they are still alive at the time of data collection) or
uncensored (i.e., they have passed away).
iii. Treatment group (A or B). Age and Sex.
Dataset
The dataset contains 20 observations of patients' survival times, censored status, treatment groups, age,
and sex.
Survival Time Censor Status Treatment Group Age Sex
Patient ID
(Months) (0=Censored, 1=Event) (0=Control, 1=New Therapy) (Years) (0=Female, 1=Male)
1 12 1 0 55 1
2 24 0 1 62 0
3 9 1 0 48 1
4 18 1 1 58 0
5 30 0 0 65 1
6 6 1 1 42 0
7 15 0 0 52 1
8 28 1 1 60 0
9 10 1 0 45 1
10 22 0 1 57 0
11 14 1 0 50 1
12 26 0 1 63 0
13 8 1 0 43 1
14 20 1 1 59 0
15 32 0 0 68 1
16 5 1 1 40 0
17 16 0 0 54 1
18 29 1 1 61 0
19 11 1 0 46 1
20 23 0 1 58 0
Tasks
(i). Descriptive Analysis:
o Compute the mean survival time for both Treatment A and Treatment B.
o Report the percentage of censored patients in each treatment group.
(ii). Kaplan-Meier Survival Curves:
o Plot Kaplan-Meier survival curves for both treatment groups.
o Compare the survival probabilities over time.
(iii). Log-Rank Test:
o Perform the log-rank test to compare the survival distributions between Treatment A and
Treatment B.
o State the null hypothesis (H0) and alternative hypothesis (H1).
o Report the test statistic, p-value, and draw conclusions at a significance level of α=0.05.
(iv). Cox Proportional Hazards Model:
o Fit a Cox regression model with treatment as a predictor variable to determine the
hazard ratio.
o Interpret the hazard ratio and explain if Treatment A significantly reduces the risk of
death compared to Treatment B.
(v). Conclusion:
o Summarize your findings.
o Recommend whether the hospital should adopt the new therapy (Treatment A) based on
statistical evidence.