Comparing survival times between treatment and placebo groups using right-censored data.

R · Kaplan-Meier estimation · Log-rank test · Wilcoxon rank-sum test · Power analysis

For this course project in mathematical statistics, I analysed a supplied simulated dataset with right-censored survival times from treatment and placebo groups. I estimated survival curves using the Kaplan-Meier method and compared the groups with a log-rank test. I also used the estimated hazard ratio to calculate statistical power for a given number of events and the number of events required for a specified level of power. Age distributions were compared using the Wilcoxon rank-sum test to investigate potential confounding. Alongside the analysis in R, the report explains the methods’ assumptions and provides intuitive derivations of the Kaplan-Meier estimator and the test statistics, including their distributions under the null hypothesis.