Versatile Tests for Comparing Survival Curves Based on Weighted Log-rank Statistics